New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bepo65/dayjs-demo-submodule

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bepo65/dayjs-demo-submodule

A simple node module with dayjs

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

@bepo65/dayjs-demo-submodule

Version License: MIT

Minimal package to show what happens, when package using dayjs uses different plugin configuration than program that uses this package (See dayjs issue #1577 for the corresponding question).

Use this package in a program

npm install @bepo65/dayjs-demo-submodule

and then in the test program

import dayjs from 'dayjs';
import updateLocale from 'dayjs/plugin/updateLocale.js';
import relativeTime from 'dayjs/plugin/relativeTime.js';
import { formatNow } from '@bepo65/dayjs-demo-submodule';

dayjs.extend(relativeTime);
dayjs.extend(updateLocale);

// update locale
dayjs.updateLocale('en', {
  relativeTime: {
    future: 'in %s',
    past: '%s ago',
    s: 'a few modified seconds',
    m: '1 minute',
    mm: '%d modified minutes',
    h: '1 hour',
    hh: '%d modified hours',
    d: '1 day',
    dd: '%d days',
    M: 'a month',
    MM: '%d months',
    y: 'a year',
    yy: '%d years'
  }
});

console.log(`dayjs in this program gets '${dayjs(new Date()).fromNow()}' from dayjs.fromNow()`);
console.log(`dayjs in the imported package gets '${formatNow()}' from the formatNow`);

The test programm will show twice a few seconds ago.

FAQs

Package last updated on 09 Oct 2021

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