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

shamsi-holidays

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shamsi-holidays - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

13

lib/holidays.js

@@ -46,2 +46,3 @@ "use strict";

var util_1 = require("./util");
var path = require("path");
var requestToTime = function (month, year) { return __awaiter(void 0, void 0, void 0, function () {

@@ -256,3 +257,3 @@ var defer, crawler;

return __awaiter(void 0, void 0, void 0, function () {
var isHoliday, year, fileName, staticHolidays;
var isHoliday, year, filePath, staticHolidays;
return __generator(this, function (_a) {

@@ -262,4 +263,4 @@ isHoliday = false;

year = moment(date, 'jYYYY/jMM/jDD').format('jYYYY');
fileName = "./static-holidays-data/holidays" + year + ".json";
staticHolidays = (0, util_1.readFile)(fileName);
filePath = path.join(__dirname, "/static-holidays-data/holidays" + year + ".json");
staticHolidays = (0, util_1.readFile)(filePath);
if (staticHolidays.length !== 0) {

@@ -287,7 +288,7 @@ try {

return __awaiter(void 0, void 0, void 0, function () {
var fileName, staticHolidays;
var filePath, staticHolidays;
return __generator(this, function (_a) {
year = (year) ? year : moment().format('jYYYY');
fileName = "./static-holidays-data/holidays" + year + ".json";
staticHolidays = (0, util_1.readFile)(fileName);
filePath = path.join(__dirname, "/static-holidays-data/holidays" + year + ".json");
staticHolidays = (0, util_1.readFile)(filePath);
if (staticHolidays.length !== 0) {

@@ -294,0 +295,0 @@ return [2 /*return*/, staticHolidays];

@@ -31,6 +31,6 @@ "use strict";

// // console.log("isHolidaysOnline:", x3);
// let x4 = await updateStaticHolidayDays('1406')
// console.log("updateStaticHolidayDays:", x4);
// // let x5 = await isHoliday("1400/01/01")
// // console.log("isHoliday:", x5);
// // let x4 = await updateStaticHolidayDays('1406')
// // console.log("updateStaticHolidayDays:", x4);
// let x5 = await isHoliday("1400/01/01")
// console.log("isHoliday:", x5);
// // let x6 = await getHolidays("1400")

@@ -37,0 +37,0 @@ // // console.log("getHolidays:", x6);

{
"name": "shamsi-holidays",
"version": "0.0.8",
"version": "0.0.9",
"description": "This module provides dates of holidays for Iran",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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