@robert.tools/utils
v1.2.0
Published
A collection of little helper functions.
Maintainers
Readme
🗂️ @robert.tools/utils
A collection of little helper functions.
📜 Usage
🟢 Installation
npm install @robert.tools/utils📝 Sample usage
import { sortASC } from '@robert.tools/utils';
sortASC(['foo', 'bar', 'Etag', 'baz']); // ['bar', 'baz', 'Etag', 'foo']🗃️ commands
After an npm install with npm i the following commands are available:
- sort asc:
sortASC(array) - get prop:
getProp(obj, key, defaultValue) - filter object:
filterObject(obj, KEYS, type) - check value is type:
isType(value, type) - cast value to type:
toType(value, type)
⚖️ Notes
This software is hand-crafted, test-driven and assisted by AI tools. I know each line of my code. ✌️
| Tool | Comment |
| --- | --- |
| | Test-driven development with Jest |
|
| Part of the robert.tools ecosystem |
|
| Code completion |
|
| chatGPT research |
