Socket
Socket
Sign inDemoInstall

ensure-date-fns-supports-locale

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ensure-date-fns-supports-locale

Ensure that date-fns supports passed locale


Version published
Weekly downloads
2
Maintainers
1
Install size
5.01 kB
Created
Weekly downloads
 

Readme

Source

ensure-date-fns-supports-locale

Library helps you to be sure that passed locale(s) supported by date-fns library

Install

npm install ensure-date-fns-supports-locale --save

or

yarn add ensure-date-fns-supports-locale

Usage

const ensureLocale = require('ensure-date-fns-supports-locale');

// check single locale
const ensureIsRussianSupported = ensureLocale('ru'); // true
const ensureIsElvenSupported = ensureLocale('elv'); // false

// check array of locales
const ensureLocalesSupported = ensureLocale(['ru', 'en', 'eo']); // true
const ensureLocalesSupported = ensureLocale(['zzz', 'en', 'eo']); // false

Tests

npm test

Keywords

FAQs

Last updated on 24 Mar 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc