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

@naturalcycles/time-lib

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/time-lib

Date/time related API, based on Day.js

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
154
decreased by-36.36%
Maintainers
3
Weekly downloads
 
Created
Source

@naturalcycles/time-lib

Date/time API, based on Dayjs.

npm min.gz size code style: prettier

Why

  • Fixes TypeScript imports, regardless if esModuleInterop is used or not
  • Allows to use it as ESM package with tree-shaking (without breaking your TypeScript again)
  • Opinionated. Includes "needed" dayjs plugins by default.
  • Allows to "just import dayjs" and not worry about:
    • Loading plugins for all of your "entry points", such as startServer.ts, setupJest.ts, at every cron job, etc.
    • That plugins are loaded BEFORE they are used (dependent on import order)
    • That TypeScript types are not loaded with plugins
  • Extends dayjs with some useful functions (via Plugin interface)
  • Has working isoWeekday plugin
  • Has en-gb locale by default, so, default firstDayOfWeek is Monday

API

TODO

Packaging

  • engines.node >= 10.13: Latest Node.js LTS
  • main: dist/index.js: commonjs, es2015
  • types: dist/index.d.ts: typescript types
  • /src folder with source *.ts files included

Keywords

FAQs

Package last updated on 08 Dec 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