Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@naturalcycles/js-lib

Package Overview
Dependencies
Maintainers
3
Versions
525
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/js-lib

Standard library for universal (browser + Node.js) javascript

  • 11.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3K
decreased by-15.99%
Maintainers
3
Weekly downloads
 
Created
Source

@naturalcycles/js-lib

Standard library for universal (browser + Node.js) javascript

npm min.gz size loc Maintainability Test Coverage code style: prettier

Features

  • Decorators

    • @memo, @memoCache
    • @Debounce, @Throttle
    • @Retry, @TryCatch
    • ...
  • Error

    • AppError
  • Utils

    • objectSharedUtil
    • randomSharedUtil
    • scriptSharedUtil
    • stringSharedUtil
  • Services

    • sentryService
  • Testing

    • testSharedUtil
  • types

    • StringMap
    • PromiseMap
  • ... 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 peerDependencies in this project, in order for the consuming project to have control over the version of each dependency (in their yarn.lock).

Packaging

  • engines.node >= Node.js LTS
  • main: dist/index.js: commonjs, es2017 - targeting Node.js
  • module: dist-esm/index.js: esm, es2015 - targeting Browsers
  • types: dist/index.d.ts: typescript types
  • /src folder with source *.ts files included

FAQs

Package last updated on 13 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc