1.2.0 • Published 7 months ago
alltools-hadex v1.2.0
alltools-hadex
A simple collection of helpful utility functions created by Hadex.
These functions provide time, date, version, owner, and more.
Table of Contents
Installation
yarn add alltools-hadex
After installation, you can use the functions in your project.
Usage
To use the functions, simply require the module in your project:
const {
hadexTime,
hadexDate,
sver,
showOwner,
showDayUntilNextYear
} = require('alltools-hadex');
// Get the current time
console.log("Current Time:", hadexTime());
// Get today's date
console.log("Today's Date:", hadexDate());
// Get the package version
console.log("Package Version:", sver());
// Show the owner of the package
showOwner();
// Show how many days left until next year
showDayUntilNextYear();
Functions
hadexTime
Returns the current time as a string in the local format.
Example:
console.log(hadexTime());
hadexDate
Returns the current date as a string in the local format.
Example:
console.log(hadexDate());
sver
Returns the version of the package from the package.json
.
Example:
console.log(sver());
showOwner
Prints the owner of the package, "Hadex".
Example:
showOwner();
showDayUntilNextYear
Shows how many days are left until the next year.
Example:
showDayUntilNextYear();
Credits
This package was created by Hadex.
Please give credits if you decide to rewrite or modify the code.
License
This project is licensed under the MIT License - see the LICENSE file for details.