1.2.3 • Published 1 year ago

whispering-pine-utils v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

whispering-pine-utils

A set of utility functions for common tasks like validation, date formatting, and slugification. This lightweight library is perfect for projects that require basic utility functions without the overhead of larger libraries.

Installation

To install the library, run:

npm install whispering-pine-utils

Usage

Validating an Email

import { isValidEmail } from 'whispering-pine-utils';

console.log(isValidEmail('example@test.com')); // true
console.log(isValidEmail('invalid-email')); // false

Formatting a Date

import { formatDate } from 'whispering-pine-utils';

console.log(formatDate(new Date(), 'dd-mm-yyyy')); // '20-03-2024'
console.log(formatDate(new Date(), 'mm/dd/yyyy')); // '03/20/2024'

Slugifying a String

import { slugify } from 'whispering-pine-utils';

console.log(slugify('Some Text Here!')); // 'some-text-here'
console.log(slugify('Another Text!')); // 'another-text'

Contributing

We welcome contributions! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Licensing

This project is licensed under the MIT License - see the LICENSE file for details.

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.0.0

1 year ago