Greet a user according to the TimeZone using DENO. Returns Good Morning,Good Afternoon,Good Evening.
Import the GreetUser
function and use it:
import { GreetUser } from "https://deno.land/x/greet_user/mod.ts";
const greetUser = async () => {
console.log(await GreetUser());
}
greetUser();
Alternatively, you can use it directly from the CLI by using deno run --allow-net cli.ts
:
deno run --allow-net https://deno.land/x/greet_user/cli.ts
You can also install it globally using the following:
deno install --allow-net -n greet_user https://deno.land/x/greet_user/cli.ts
Then, the package is available to run:
greet_user
Required permissions:
--allow-net
-
Success
* Good Morning * Good Afternoon. * Good Evening. * Grab A Coffee.
-
Fail
* Hello
Run tests:
deno test --allow-net
MIT © Mohit Gupta