@thatguyjamal/lib-js
v1.0.8
Published
An opinionated collection of helpful JavaScript functions in one NPM package.
Downloads
2
Maintainers
Readme
Lib-Js
A collection of javascript helpers and utilities using pure JavaScript only.
Installation
npm install @thatguyjamal/lib-js
Usage
// Instance classes
import { Cache } from '@thatguyjamal/lib-js';
import { TaskQueue } from '@thatguyjamal/lib-js';
import { LazyTaskQueue } from '@thatguyjamal/lib-js';
// Static classes
import { Validator } from '@thatguyjamal/lib-js';
import { FuncHelper } from '@thatguyjamal/lib-js';
import { MathUtils } from '@thatguyjamal/lib-js';
import { ArrayUtils } from '@thatguyjamal/lib-js';
import { ObjectUtils } from '@thatguyjamal/lib-js';
Most of the classes are static classes, meaning you can use them without instantiating them.
import { Validator } from '@thatguyjamal/lib-js';
const isValidEmail = Validator.isEmail('[email protected]'); // true
Please read the source code to learn how to use the classes, enjoy!
Classes
| Utilities/Helpers | Description | |
| :------------------------------------ | :--------------------------------------------------- | :-- |
| Cache | A 2n
cache for performant applications | |
| TaskQueue | A ordered queue for functions | |
| LazyTaskQueue | A lazy ordered queue for functions | |
| FunctionHelper | Function helper methods | |
| ObjectHelper | Object helper methods | |
| MathUtils | Helper methods for math | |
| ArrayUtils | Helper methods for arrays | |
| StringUtils | Helper methods for strings | |
| Validator | Helpful validators for utils, emails, passwords, etc | |