greet-visitor

1.0.2 • Public • Published

Greet Visitor

Greet your Visitors with Good Morning, Good Afternoon or Good Evening Message using JavaScript

Install using npm

npm install greet-visitor

Sample Output - with emoji

Time Range Output
>= 3 - <= 12 🌞 Good morning
>= 12 - <= 17 🌞 Good afternoon
>= 17 - <= 20 🌓 Good evening
>= 20 - <= 24 🌒 Good night
>= 23 - <= 3 🌚 Oh! working late night

Configurable Default Options

{
    "emoji": true,
    "morning": "Good morning",
    "noon": "Good afternoon",
    "evening": "Good evening",
    "night": "Good night",
    "midnight": "Oh! working late night",
}

Sample Code

var greet = require("greet-visitor");

greet();
// Based on system default time it will show different messages. as mentioned above

Sample Code with Option Change

var greet = require("greet-visitor");

greet({emoji: false, noon: "Good noon !"});

// Output- at noon
"Good noon !"

// Output- in morning
"Good Morning"

License

MIT

Package Sidebar

Install

npm i greet-visitor

Weekly Downloads

6

Version

1.0.2

License

ISC

Unpacked Size

2.87 kB

Total Files

3

Last publish

Collaborators

  • mjhawar90