# nodejs-lib
Standard library for Node.js
# 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
- Secrets
- kpy, del fs
# Other commands
json2env
: for specified.json
file will create.json.sh
file next to it that will "export" all values of json file as environment variables. Will also append $BASH_ENV (if defined) for CircleCI. Example:yarn json2env someFile.json
will createsomeFile.json.sh
--prefix
will prepend all keys withprefix
string, e.g--prefix buildInfo_
will output asbuildInfo_key1
,buildInfo_key2
, etc.--no-save-env-file
to skip saving.sh
file--no-bash-env
to skip adding to$BASH_ENV
--no-fail
will not throw error on missing input file--silent
--debug
# Exports
/
root/bin
cli- yargs
- globby
/script
- exports
runScript
lightweight function (0 deps)
- exports
/exec
- execa
/colors
- only chalk
/fs
- exports
kpy
,kpySync
,del
,json2env
- exports
# Packaging
engines.node
: Latest Node.js LTSmain: dist/index.js
: commonjs, es2020types: dist/index.d.ts
: typescript types/src
folder with source*.ts
files included