@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
38 lines (29 loc) • 1.91 kB
Markdown
## @naturalcycles/nodejs-lib
> Standard library for Node.js
[](https://www.npmjs.com/package/@naturalcycles/nodejs-lib)
[](https://packagephobia.now.sh/result?p=@naturalcycles/nodejs-lib)
[](https://packagephobia.now.sh/result?p=@naturalcycles/nodejs-lib)
[](https://circleci.com/gh/NaturalCycles/nodejs-lib)
[](https://codeclimate.com/github/NaturalCycles/nodejs-lib/maintainability)
[](https://codeclimate.com/github/NaturalCycles/nodejs-lib/test_coverage)
[](https://github.com/prettier/prettier)
# Features
- Validation (based on Joi)
- debug (based on debug) with .warn(), .error() levels
- env.util
- zip.util
- id.util (based on nanoid)
- hash.util
- process.util (cpu, memory, etc)
- lruMemoCache (implementation of MemoCache based on lru-cache)
- SlackService
# What should go in this lib
- Only battle-tested code with solid proven APIs that are not supposed to change.
- Only fully unit-tested code with coverage close to 100%. All the branches should absolutely be
tested.
- Only generic and broad purpose functions, no domain or project-specific code.
# Packaging
- `engines.node`: Latest Node.js LTS
- `main: dist/index.js`: commonjs, es2018
- `types: dist/index.d.ts`: typescript types
- `/src` folder with source `*.ts` files included