@n3okill/utils
v2.0.4
Published
Many javascript helpers
Downloads
19
Maintainers
Readme
Utils
Typescript Utilities library
Description
Utils is intended to make development of NodeJs apps faster & easier by defining various methods to work with arrays, string, objects, among others.
The functions in this library are expected to be static for the forseable future, only having improvements but never changing input parameters, return values or types.
Usage
Install the package
npm install @n3okill/utils
There's multiple ways to use the library:
import * as Util from "@n3okill/utils";
or
import { Type, ArrayUtil } from "@n3okill/utils";
Runing tests
npm run lint
: runs the linternpm run unit
: run unit testsnpm test
: run both lint and unit tests
Contribute
If you find a problem with the package you can
or even make a
Proposing a new helper
If you wan't to propose a new helper, following this steps would be much apreciated:
- Develop the new helper, with clean and readable code
- Develop tests for the new helper
- Include in the comments a description of what the helper does, the input arguments and what it returns
Documentation
This package is divided into modules, and there's no access to individual functions.
- ArrayUtil - Array Utilities
- BufferUtil - Buffer Utilities
- Configuration - Objects and strings related utilities
- Mixers - Object cloning and filling Utilities
- NumberUtil - Number Utilities
- ObjectUtil - Object Utilities, like clone among other's
- Other - Other cloning types utilities
- Security - Basic security related Utilities
- StringUtil - String Utilities
- Type - Many type utilities
Examples
Just check the tests folder
Why this module
There are many other utilities packages out there that can do some or most of the things that this package can, and the problem is mainly that, there are many packages and some of them with many dependencies, this package was built to don't have any dependencies, excluding dev dependencies, and it's expectable to don't have any dependencies in the future, unless it's a very simple dependency with none dependencies (excluding dev).
This is a very opinionated package but there's no reason to exclude any improvements or adding new helpers.
License
MIT License
Copyright (c) 2016 - 2021 Joao Parreira [email protected]