@justthedev123/builderutils
v1.0.0
Published
Basic utilities for developers
Maintainers
Readme
@justthedev/builderutils
A lightweight and powerful collection of JavaScript utility functions. No dependencies. Built for speed, simplicity, and developer happiness 😄
Installation
npm install @justthedev/builderutils Functions
isWeekend(date?)
Checks if a given date falls on the weekend.
isWeekend(); // true or falserandomEmoji()
Returns a random emoji.
randomEmoji(); // "🎉"durationHumanizer(ms)
Converts milliseconds into "1h 23m 45s" format.
durationHumanizer(5023000); // "1h 23m 43s"formatTimeMs(ms)
Converts milliseconds into "hh:mm:ss" format.
formatTimeMs(5023000); // "01:23:43"portChecker(port, host?)
Checks if a port is available (default: localhost).
await portChecker(3000); // true or falseyesNoPrompt(question?)
Simple CLI yes/no prompt.
const answer = await yesNoPrompt("Continue?");
console.log(answer ? "Yes" : "No");simpleProgress(current, total, width?)
Displays a basic CLI progress bar.
simpleProgress(50, 100); // [█████-----] 50%fakeUser()
Generates a random fake user with name, email, username, password, phone number, and address.
fakeUser();
/*
{
name: 'Emma Bakker',
email: '[email protected]',
username: 'Emma732',
password: 'k7s93jf9kd',
phone: '06-12345678',
address: 'Dorpsstraat 82, Rotterdam'
}
*/Author
Made with ❤️ by JustTheDev
License
MIT
