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

us-holidays-helper

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

us-holidays-helper - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

dist/index.d.mts

2

dist/index.d.ts

@@ -49,2 +49,2 @@ declare type Holiday = "christmas" | "easter" | "halloween" | "valentinesDay" | "mothersDay" | "indigenousPeoplesDay" | "independenceDay" | "presidentsDay" | "laborDay" | "veteransDay" | "thanksgiving" | "newYearsEve" | "martinLutherKingJrDay" | "newYearsDay" | "fathersDay" | "memorialDay" | "goodFriday" | "juneteenth";

export { Holiday, Holidays, getBankHolidays, getChristmas, getEaster, getFathersDay, getFederalHolidays, getGoodFriday, getHalloween, getHolidays, getIndependenceDay, getIndigenousPeoplesDay, getJuneteenth, getLaborDay, getMartinLutherKingJrDay, getMemorialDay, getMothersDay, getNewYearsDay, getNewYearsEve, getObservedHolidays, getPresidentsDay, getThanksgiving, getValentinesDay, getVeteransDay, isBankHoliday, isDateAHoliday, isFederalHoliday, isHoliday, isInHolidayList };
export { type Holiday, type Holidays, getBankHolidays, getChristmas, getEaster, getFathersDay, getFederalHolidays, getGoodFriday, getHalloween, getHolidays, getIndependenceDay, getIndigenousPeoplesDay, getJuneteenth, getLaborDay, getMartinLutherKingJrDay, getMemorialDay, getMothersDay, getNewYearsDay, getNewYearsEve, getObservedHolidays, getPresidentsDay, getThanksgiving, getValentinesDay, getVeteransDay, isBankHoliday, isDateAHoliday, isFederalHoliday, isHoliday, isInHolidayList };
"use strict";
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for(var i = 1; i < arguments.length; i++){
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function(key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) {
symbols = symbols.filter(function(sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpreadProps(target, source) {
source = source != null ? source : {};
if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function(key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
var __defProp = Object.defineProperty;

@@ -6,356 +58,425 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
var __export = function(target, all) {
for(var name in all)__defProp(target, name, {
get: all[name],
enumerable: true
});
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
var __copyProps = function(to, from, except, desc) {
if (from && typeof from === "object" || typeof from === "function") {
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
try {
var _loop = function() {
var key = _step.value;
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: function() {
return from[key];
},
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
};
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally{
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally{
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __toCommonJS = function(mod) {
return __copyProps(__defProp({}, "__esModule", {
value: true
}), mod);
};
// src/index.ts
var src_exports = {};
__export(src_exports, {
getBankHolidays: () => getBankHolidays,
getChristmas: () => getChristmas,
getEaster: () => getEaster,
getFathersDay: () => getFathersDay,
getFederalHolidays: () => getFederalHolidays,
getGoodFriday: () => getGoodFriday,
getHalloween: () => getHalloween,
getHolidays: () => getHolidays,
getIndependenceDay: () => getIndependenceDay,
getIndigenousPeoplesDay: () => getIndigenousPeoplesDay,
getJuneteenth: () => getJuneteenth,
getLaborDay: () => getLaborDay,
getMartinLutherKingJrDay: () => getMartinLutherKingJrDay,
getMemorialDay: () => getMemorialDay,
getMothersDay: () => getMothersDay,
getNewYearsDay: () => getNewYearsDay,
getNewYearsEve: () => getNewYearsEve,
getObservedHolidays: () => getObservedHolidays,
getPresidentsDay: () => getPresidentsDay,
getThanksgiving: () => getThanksgiving,
getValentinesDay: () => getValentinesDay,
getVeteransDay: () => getVeteransDay,
isBankHoliday: () => isBankHoliday,
isDateAHoliday: () => isDateAHoliday,
isFederalHoliday: () => isFederalHoliday,
isHoliday: () => isHoliday,
isInHolidayList: () => isInHolidayList
getBankHolidays: function() {
return getBankHolidays;
},
getChristmas: function() {
return getChristmas;
},
getEaster: function() {
return getEaster;
},
getFathersDay: function() {
return getFathersDay;
},
getFederalHolidays: function() {
return getFederalHolidays;
},
getGoodFriday: function() {
return getGoodFriday;
},
getHalloween: function() {
return getHalloween;
},
getHolidays: function() {
return getHolidays;
},
getIndependenceDay: function() {
return getIndependenceDay;
},
getIndigenousPeoplesDay: function() {
return getIndigenousPeoplesDay;
},
getJuneteenth: function() {
return getJuneteenth;
},
getLaborDay: function() {
return getLaborDay;
},
getMartinLutherKingJrDay: function() {
return getMartinLutherKingJrDay;
},
getMemorialDay: function() {
return getMemorialDay;
},
getMothersDay: function() {
return getMothersDay;
},
getNewYearsDay: function() {
return getNewYearsDay;
},
getNewYearsEve: function() {
return getNewYearsEve;
},
getObservedHolidays: function() {
return getObservedHolidays;
},
getPresidentsDay: function() {
return getPresidentsDay;
},
getThanksgiving: function() {
return getThanksgiving;
},
getValentinesDay: function() {
return getValentinesDay;
},
getVeteransDay: function() {
return getVeteransDay;
},
isBankHoliday: function() {
return isBankHoliday;
},
isDateAHoliday: function() {
return isDateAHoliday;
},
isFederalHoliday: function() {
return isFederalHoliday;
},
isHoliday: function() {
return isHoliday;
},
isInHolidayList: function() {
return isInHolidayList;
}
});
module.exports = __toCommonJS(src_exports);
var import_date_fns2 = require("date-fns");
// src/utils.ts
var import_date_fns = require("date-fns");
function getFirstOccurence(date, dayOfWeekIndex) {
return getNextOccurence((0, import_date_fns.setDate)(date, 1), dayOfWeekIndex);
return getNextOccurence((0, import_date_fns.setDate)(date, 1), dayOfWeekIndex);
}
function getNextOccurence(date, dayOfWeekIndex) {
if ((0, import_date_fns.getDay)(date) === dayOfWeekIndex) {
if ((0, import_date_fns.getDay)(date) === dayOfWeekIndex) {
return date;
}
if ((0, import_date_fns.getDay)(date) > dayOfWeekIndex) {
date = (0, import_date_fns.addDays)(date, 7 - (0, import_date_fns.getDay)(date) + dayOfWeekIndex);
} else {
date = (0, import_date_fns.addDays)(date, dayOfWeekIndex - (0, import_date_fns.getDay)(date));
}
return date;
}
if ((0, import_date_fns.getDay)(date) > dayOfWeekIndex) {
date = (0, import_date_fns.addDays)(date, 7 - (0, import_date_fns.getDay)(date) + dayOfWeekIndex);
} else {
date = (0, import_date_fns.addDays)(date, dayOfWeekIndex - (0, import_date_fns.getDay)(date));
}
return date;
}
function getPrevOccurence(date, dayOfWeekIndex) {
if ((0, import_date_fns.getDay)(date) === dayOfWeekIndex) {
if ((0, import_date_fns.getDay)(date) === dayOfWeekIndex) {
return date;
}
if ((0, import_date_fns.getDay)(date) > dayOfWeekIndex) {
date = (0, import_date_fns.addDays)(date, -1 * ((0, import_date_fns.getDay)(date) - dayOfWeekIndex));
} else {
date = (0, import_date_fns.addDays)(date, -1 * ((0, import_date_fns.getDay)(date) - 0 + (7 - dayOfWeekIndex)));
}
return date;
}
if ((0, import_date_fns.getDay)(date) > dayOfWeekIndex) {
date = (0, import_date_fns.addDays)(date, -1 * ((0, import_date_fns.getDay)(date) - dayOfWeekIndex));
} else {
date = (0, import_date_fns.addDays)(date, -1 * ((0, import_date_fns.getDay)(date) - 0 + (7 - dayOfWeekIndex)));
}
return date;
}
function getLastOfMonth(date, dayOfWeekIndex) {
return getPrevOccurence((0, import_date_fns.lastDayOfMonth)(date), dayOfWeekIndex);
return getPrevOccurence((0, import_date_fns.lastDayOfMonth)(date), dayOfWeekIndex);
}
// src/index.ts
function getHalloween(year) {
return new Date(year, 9, 31);
return new Date(year, 9, 31);
}
function getValentinesDay(year) {
return new Date(year, 1, 14);
return new Date(year, 1, 14);
}
function getMothersDay(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 4), 0), 1);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 4), 0), 1);
}
function getJuneteenth(year) {
return new Date(year, 5, 19);
return new Date(year, 5, 19);
}
function getEaster(year) {
if (year < 325) {
throw new RangeError("Cannot calculate Easter dates before 325 AD.");
}
function mod(a2, b2) {
return a2 % b2;
}
function div(a2, b2) {
const q = a2 / b2;
if (q < 0) {
throw new Error("Unexpected negative q");
var mod = function mod(a2, b2) {
return a2 % b2;
};
var div = function div(a2, b2) {
var q = a2 / b2;
if (q < 0) {
throw new Error("Unexpected negative q");
}
return Math.floor(q);
};
if (year < 325) {
throw new RangeError("Cannot calculate Easter dates before 325 AD.");
}
return Math.floor(q);
}
const y = year, skipMarchDays = 21, a = mod(y, 19), b = div(y, 100), c = mod(y, 100), d = div(b, 4), e = mod(b, 4), f = div(b + 8, 25), g = div(b - f + 1, 3), h = mod(19 * a + b - d - g + 15, 30), i = div(c, 4), k = mod(c, 4), l = mod(32 + 2 * e + 2 * i - h - k, 7), m = div(a + 11 * h + 22 * l, 451), t = h + l - 7 * m + skipMarchDays, n = div(t, 31) + 3, p = mod(t, 31);
return new Date(year, n - 1, p + 1);
var y = year, skipMarchDays = 21, a = mod(y, 19), b = div(y, 100), c = mod(y, 100), d = div(b, 4), e = mod(b, 4), f = div(b + 8, 25), g = div(b - f + 1, 3), h = mod(19 * a + b - d - g + 15, 30), i = div(c, 4), k = mod(c, 4), l = mod(32 + 2 * e + 2 * i - h - k, 7), m = div(a + 11 * h + 22 * l, 451), t = h + l - 7 * m + skipMarchDays, n = div(t, 31) + 3, p = mod(t, 31);
return new Date(year, n - 1, p + 1);
}
function getIndigenousPeoplesDay(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 9), 1), 1);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 9), 1), 1);
}
function getIndependenceDay(year) {
return new Date(year, 6, 4);
return new Date(year, 6, 4);
}
function getPresidentsDay(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 1), 1), 2);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 1), 1), 2);
}
function getChristmas(year) {
return new Date(year, 11, 25);
return new Date(year, 11, 25);
}
function getLaborDay(year) {
return getFirstOccurence(new Date(year, 8), 1);
return getFirstOccurence(new Date(year, 8), 1);
}
function getVeteransDay(year) {
return new Date(year, 10, 11);
return new Date(year, 10, 11);
}
function getThanksgiving(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 10), 4), 3);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 10), 4), 3);
}
function getNewYearsEve(year) {
return (0, import_date_fns2.lastDayOfMonth)(new Date(year, 11));
return (0, import_date_fns2.lastDayOfMonth)(new Date(year, 11));
}
function getMartinLutherKingJrDay(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 0), 1), 2);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 0), 1), 2);
}
function getNewYearsDay(year) {
return new Date(year, 0, 1);
return new Date(year, 0, 1);
}
function getFathersDay(year) {
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 5), 0), 2);
return (0, import_date_fns2.addWeeks)(getFirstOccurence(new Date(year, 5), 0), 2);
}
function getMemorialDay(year) {
return getLastOfMonth(new Date(year, 4), 1);
return getLastOfMonth(new Date(year, 4), 1);
}
function getGoodFriday(year) {
return (0, import_date_fns2.addDays)(getEaster(year), -2);
return (0, import_date_fns2.addDays)(getEaster(year), -2);
}
function getHolidays(year) {
return {
newYearsDay: {
date: getNewYearsDay(year),
bankHoliday: true,
federal: true
},
martinLutherKingJrDay: {
date: getMartinLutherKingJrDay(year),
bankHoliday: true,
federal: true
},
valentinesDay: {
date: getValentinesDay(year),
bankHoliday: false,
federal: false
},
juneteenth: {
date: getJuneteenth(year),
bankHoliday: year < 2022 ? false : true,
federal: true
},
easter: {
date: getEaster(year),
bankHoliday: false,
federal: false
},
presidentsDay: {
date: getPresidentsDay(year),
bankHoliday: true,
federal: false
},
memorialDay: {
date: getMemorialDay(year),
bankHoliday: true,
federal: true
},
independenceDay: {
date: getIndependenceDay(year),
bankHoliday: true,
federal: true
},
laborDay: {
date: getLaborDay(year),
bankHoliday: true,
federal: true
},
goodFriday: {
date: getGoodFriday(year),
bankHoliday: false,
federal: false
},
mothersDay: {
date: getMothersDay(year),
bankHoliday: false,
federal: false
},
indigenousPeoplesDay: {
date: getIndigenousPeoplesDay(year),
bankHoliday: true,
federal: true
},
halloween: {
date: getHalloween(year),
bankHoliday: false,
federal: false
},
fathersDay: {
date: getFathersDay(year),
bankHoliday: false,
federal: false
},
veteransDay: {
date: getVeteransDay(year),
bankHoliday: true,
federal: true
},
thanksgiving: {
date: getThanksgiving(year),
bankHoliday: true,
federal: true
},
christmas: {
date: getChristmas(year),
bankHoliday: true,
federal: true
},
newYearsEve: {
date: getNewYearsEve(year),
bankHoliday: false,
federal: false
}
};
return {
newYearsDay: {
date: getNewYearsDay(year),
bankHoliday: true,
federal: true
},
martinLutherKingJrDay: {
date: getMartinLutherKingJrDay(year),
bankHoliday: true,
federal: true
},
valentinesDay: {
date: getValentinesDay(year),
bankHoliday: false,
federal: false
},
juneteenth: {
date: getJuneteenth(year),
bankHoliday: year < 2022 ? false : true,
federal: true
},
easter: {
date: getEaster(year),
bankHoliday: false,
federal: false
},
presidentsDay: {
date: getPresidentsDay(year),
bankHoliday: true,
federal: false
},
memorialDay: {
date: getMemorialDay(year),
bankHoliday: true,
federal: true
},
independenceDay: {
date: getIndependenceDay(year),
bankHoliday: true,
federal: true
},
laborDay: {
date: getLaborDay(year),
bankHoliday: true,
federal: true
},
goodFriday: {
date: getGoodFriday(year),
bankHoliday: false,
federal: false
},
mothersDay: {
date: getMothersDay(year),
bankHoliday: false,
federal: false
},
indigenousPeoplesDay: {
date: getIndigenousPeoplesDay(year),
bankHoliday: true,
federal: true
},
halloween: {
date: getHalloween(year),
bankHoliday: false,
federal: false
},
fathersDay: {
date: getFathersDay(year),
bankHoliday: false,
federal: false
},
veteransDay: {
date: getVeteransDay(year),
bankHoliday: true,
federal: true
},
thanksgiving: {
date: getThanksgiving(year),
bankHoliday: true,
federal: true
},
christmas: {
date: getChristmas(year),
bankHoliday: true,
federal: true
},
newYearsEve: {
date: getNewYearsEve(year),
bankHoliday: false,
federal: false
}
};
}
function getBankHolidays(year) {
const holidays = getHolidays(year);
return Object.keys(holidays).reduce((acc, holidayName) => {
const holiday = holidays[holidayName];
if (holiday.bankHoliday) {
return {
...acc,
[holidayName]: {
date: holiday.date
var holidays = getHolidays(year);
return Object.keys(holidays).reduce(function(acc, holidayName) {
var holiday = holidays[holidayName];
if (holiday.bankHoliday) {
return _objectSpreadProps(_objectSpread({}, acc), _defineProperty({}, holidayName, {
date: holiday.date
}));
}
};
}
return acc;
}, {});
return acc;
}, {});
}
function getFederalHolidays(year) {
const holidays = getHolidays(year);
return Object.keys(holidays).reduce((acc, holidayName) => {
const holiday = holidays[holidayName];
if (holiday.federal) {
return {
...acc,
[holidayName]: {
date: holiday.date
var holidays = getHolidays(year);
return Object.keys(holidays).reduce(function(acc, holidayName) {
var holiday = holidays[holidayName];
if (holiday.federal) {
return _objectSpreadProps(_objectSpread({}, acc), _defineProperty({}, holidayName, {
date: holiday.date
}));
}
};
}
return acc;
}, {});
return acc;
}, {});
}
function getObservedHolidays(year) {
const holidays = getHolidays(year);
return Object.keys(holidays).filter((holidayName) => {
if (holidays[holidayName].federal)
return true;
return false;
}).reduce((acc, holidayName) => {
const holiday = holidays[holidayName];
if ((0, import_date_fns2.isSaturday)(holiday.date)) {
return {
...acc,
[holidayName]: {
date: (0, import_date_fns2.addDays)(holiday.date, -1)
var holidays = getHolidays(year);
return Object.keys(holidays).filter(function(holidayName) {
if (holidays[holidayName].federal) return true;
return false;
}).reduce(function(acc, holidayName) {
var holiday = holidays[holidayName];
if ((0, import_date_fns2.isSaturday)(holiday.date)) {
return _objectSpreadProps(_objectSpread({}, acc), _defineProperty({}, holidayName, {
date: (0, import_date_fns2.addDays)(holiday.date, -1)
}));
}
};
}
if ((0, import_date_fns2.isSunday)(holiday.date)) {
return {
...acc,
[holidayName]: {
date: (0, import_date_fns2.addDays)(holiday.date, 1)
if ((0, import_date_fns2.isSunday)(holiday.date)) {
return _objectSpreadProps(_objectSpread({}, acc), _defineProperty({}, holidayName, {
date: (0, import_date_fns2.addDays)(holiday.date, 1)
}));
}
};
}
return acc;
}, {});
return acc;
}, {});
}
function isInHolidayList(date, getHolidayList) {
const holidays = getHolidayList((0, import_date_fns2.getYear)(date));
return Object.keys(holidays).filter((holidayName) => {
return (0, import_date_fns2.isEqual)(date, holidays[holidayName].date);
}).length > 0;
var holidays = getHolidayList((0, import_date_fns2.getYear)(date));
return Object.keys(holidays).filter(function(holidayName) {
return (0, import_date_fns2.isEqual)(date, holidays[holidayName].date);
}).length > 0;
}
function isHoliday(date) {
return isInHolidayList(date, getHolidays);
return isInHolidayList(date, getHolidays);
}
function isFederalHoliday(date) {
return isInHolidayList(date, getFederalHolidays);
return isInHolidayList(date, getFederalHolidays);
}
function isBankHoliday(date) {
return isInHolidayList(date, getBankHolidays);
return isInHolidayList(date, getBankHolidays);
}
function isDateAHoliday(date, holidaysToInclude) {
const isAHoliday = isInHolidayList(date, (year) => {
const allHolidaysThisYear = getHolidays(year);
return Object.keys(getHolidays(year)).filter((holiday) => holidaysToInclude.includes(holiday)).reduce((filtered, holiday) => {
filtered[holiday] = allHolidaysThisYear[holiday];
return filtered;
}, {});
});
return isAHoliday;
var isAHoliday = isInHolidayList(date, function(year) {
var allHolidaysThisYear = getHolidays(year);
return Object.keys(getHolidays(year)).filter(function(holiday) {
return holidaysToInclude.includes(holiday);
}).reduce(function(filtered, holiday) {
filtered[holiday] = allHolidaysThisYear[holiday];
return filtered;
}, {});
});
return isAHoliday;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getBankHolidays,
getChristmas,
getEaster,
getFathersDay,
getFederalHolidays,
getGoodFriday,
getHalloween,
getHolidays,
getIndependenceDay,
getIndigenousPeoplesDay,
getJuneteenth,
getLaborDay,
getMartinLutherKingJrDay,
getMemorialDay,
getMothersDay,
getNewYearsDay,
getNewYearsEve,
getObservedHolidays,
getPresidentsDay,
getThanksgiving,
getValentinesDay,
getVeteransDay,
isBankHoliday,
isDateAHoliday,
isFederalHoliday,
isHoliday,
isInHolidayList
getBankHolidays: getBankHolidays,
getChristmas: getChristmas,
getEaster: getEaster,
getFathersDay: getFathersDay,
getFederalHolidays: getFederalHolidays,
getGoodFriday: getGoodFriday,
getHalloween: getHalloween,
getHolidays: getHolidays,
getIndependenceDay: getIndependenceDay,
getIndigenousPeoplesDay: getIndigenousPeoplesDay,
getJuneteenth: getJuneteenth,
getLaborDay: getLaborDay,
getMartinLutherKingJrDay: getMartinLutherKingJrDay,
getMemorialDay: getMemorialDay,
getMothersDay: getMothersDay,
getNewYearsDay: getNewYearsDay,
getNewYearsEve: getNewYearsEve,
getObservedHolidays: getObservedHolidays,
getPresidentsDay: getPresidentsDay,
getThanksgiving: getThanksgiving,
getValentinesDay: getValentinesDay,
getVeteransDay: getVeteransDay,
isBankHoliday: isBankHoliday,
isDateAHoliday: isDateAHoliday,
isFederalHoliday: isFederalHoliday,
isHoliday: isHoliday,
isInHolidayList: isInHolidayList
});
//# sourceMappingURL=index.js.map
{
"name": "us-holidays-helper",
"description": "The purpose of this project is to give an interface to work with holidays using date-fns",
"version": "1.3.0",
"version": "1.4.0",
"author": "Original: Jon Stuebe / Modified: Brady Holt",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/esm/index.js",
"browser": "dist/iife/index.js",
"typings": "dist/index.d.ts",
"type": "module",
"module": "dist/index.mjs",
"browser": "dist/index.global.js",
"typings": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/esm/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"

@@ -68,3 +67,3 @@ }

"tslib": "^2.4.0",
"tsup": "^6.2.3",
"tsup": "^8.0.2",
"typedoc": "^0.23.14",

@@ -71,0 +70,0 @@ "typedoc-plugin-markdown": "^3.13.6",

Sorry, the diff of this file is not supported yet

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