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 = ; // check single localeconst ensureIsRussianSupported = ; // trueconst ensureIsElvenSupported = ; // false // check array of localesconst ensureLocalesSupported = ; // trueconst ensureLocalesSupported = ; // false
Tests
npm test