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

date-holidays-data

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

date-holidays-data

> `date-holidays`'s data extracted to bite-sized JSON files

  • 1.4.14
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

date-holidays-data

date-holidays's data extracted to bite-sized JSON files

Version should be synchronized with date-holidays

Install

With npm

npm install date-holidays-data --save

With yarn

yarn add date-holidays-data

Usage

Data only

// Holidays of United States of America
const dataUs = require('date-holidays-data/data/US.json');

// Holidays of American Samoa, includes United States of America
const dataAsIncludesUs = require('date-holidays-data/data/AS.json');

// Holidays of United States of America, American Samoa, Guam
const dataUsAsGu = require('date-holidays-data/data/US-AS-GM.json');

Use with date-holidays-parser

// Holidays of United States of America
const dataUs = require('date-holidays-data/data/US.json');

const Holidays = require('date-holidays-parser');
const hd = new Holidays(dataUs);

// get supported countries
hd.getCountries()

// get supported states e.g. for US
hd.getStates('US')

// ...

Selective multiple countries

Install lodash.merge
yarn add lodash.merge
Use lodash.merge to combine data
const Holidays = require('date-holidays-parser');
const dataUs = require('date-holidays-data/data/US.json');
const dataVn = require('date-holidays-data/data/VN.json');
const merge = require('lodash.merge');
const dataUsVn = merge(dataUs, dataVn);
const hd = new Holidays(dataUsVn);
// ...

Update

yarn upgrade
node scripts/generate.js

License

FAQs

Package last updated on 30 Mar 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