A simple and easy-to-use library for greeting users with appropriate messages for 'good morning,' 'good evening,' and 'good night' based on the time of day
npm install day-time-greetbash
npm install day-time-greet
`
example for react.js
`jsx
import React from "react";
import { useTime } from "day-time-greet";
function App() {
const { time } = useTime();
console.log(time); // Good morning, Good afternoon, or Good evening
return (
{time}
);
}
export default App;
`
example for vanilla js
`html
Vanilla JavaScript Example
``