4.7.4 • Published 7 years ago
common-js-lib v4.7.4
@naturalcycles/js-lib
Standard library for universal (browser + Node.js) javascript
Features
- Decorators
memo,memoCache
- Error
AppError
- Utils
objectSharedUtilrandomSharedUtilscriptSharedUtilstringSharedUtil
- Services
sentryService
- Testing
testSharedUtil
typesStringMapPromiseMap
... there's more...
What should go in this lib
- Only universal code that works equally good in the browser and on the server. Otherwise - there are other libs specifically for browser and node.
- Only battle-tested code with solid proven APIs that are not supposed to change.
- Only fully unit-tested code with coverage very close to 100%. All the branches should absolutely be tested.
- Only generic and broad purpose functions, no domain or project-specific code.
- Library- and framework-agnostic, only based on standard JS or TypeScript apis. There are few exceptions for extremely popular dependencies, that will go as
peerDependenciesin this project, in order for the consuming project to have control over the version of each dependency (in theiryarn.lock).
Packaging
engines.node >= 8.11: Node.js LTSmain: dist/index.js: commonjs, es2015module: dist-esm/index.js: esm, es2015types: dist/index.d.ts: typescript types/srcfolder with source*.tsfiles included