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 | |
>= 12 - <= 17 | |
>= 17 - <= 20 | |
>= 20 - <= 24 | |
>= 23 - <= 3 |
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