New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2 to 0.0.3

12

lib/holidays.d.ts

@@ -1,7 +0,7 @@

export declare const requestToTime: any;
export declare const requestToTime: (month: string, year: string) => Promise<any>;
export declare const getHolidaysYearOnline: (year?: any) => Promise<any>;
export declare const getHolidaysYearAndMonthOnline: (year?: any, month?: any) => Promise<any>;
export declare const getHolidaysYearAndMonthsOnline: (year?: any, months?: any) => Promise<any>;
export declare const isHolidaysOnline: (date: any) => Promise<boolean>;
export declare const updateStaticHolidayDays: (year?: any) => Promise<any>;
export declare const isHolidaysOffline: (date: any) => Promise<boolean>;
export declare const getHolidaysYearAndMonthOnline: (year?: string, month?: string) => Promise<any>;
export declare const getHolidaysYearAndMonthsOnline: (year?: string, months?: string[]) => Promise<string[]>;
export declare const isHolidaysOnline: (date: string) => Promise<boolean>;
export declare const updateStaticHolidayDays: (year?: string) => Promise<string[]>;
export declare const isHolidaysOffline: (date: string) => Promise<boolean>;

@@ -91,7 +91,6 @@ "use strict";

return __awaiter(void 0, void 0, void 0, function () {
var months, result, _i, months_1, month, dayOfHolidays, converted, error_1, error_2;
var months, result, _i, months_1, month, dayOfHolidays, converted, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 7, , 8]);
year = (year) ? year : moment().format('jYYYY');

@@ -121,6 +120,2 @@ months = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];

case 6: return [2 /*return*/, result];
case 7:
error_2 = _a.sent();
throw error_2;
case 8: return [2 /*return*/];
}

@@ -132,6 +127,6 @@ });

var getHolidaysYearAndMonthOnline = function (year, month) {
if (year === void 0) { year = null; }
if (month === void 0) { month = null; }
if (year === void 0) { year = ''; }
if (month === void 0) { month = ''; }
return __awaiter(void 0, void 0, void 0, function () {
var dayOfHolidays, converted, error_3;
var dayOfHolidays, converted, error_2;
return __generator(this, function (_a) {

@@ -145,3 +140,3 @@ switch (_a.label) {

_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, (0, exports.requestToTime)({ month: month, year: year })];
return [4 /*yield*/, (0, exports.requestToTime)(month, year)];
case 2:

@@ -152,4 +147,4 @@ dayOfHolidays = _a.sent();

case 3:
error_3 = _a.sent();
throw error_3;
error_2 = _a.sent();
throw error_2;
case 4: return [2 /*return*/];

@@ -165,3 +160,3 @@ }

return __awaiter(void 0, void 0, void 0, function () {
var result, _i, months_2, month, dayOfHolidays, converted, error_4, error_5;
var result, _i, months_2, month, dayOfHolidays, converted, error_3, error_4;
return __generator(this, function (_a) {

@@ -188,4 +183,4 @@ switch (_a.label) {

case 4:
error_4 = _a.sent();
throw error_4;
error_3 = _a.sent();
throw error_3;
case 5:

@@ -196,4 +191,4 @@ _i++;

case 7:
error_5 = _a.sent();
throw error_5;
error_4 = _a.sent();
throw error_4;
case 8: return [2 /*return*/];

@@ -206,6 +201,7 @@ }

var isHolidaysOnline = function (date) { return __awaiter(void 0, void 0, void 0, function () {
var status, year, month, dayInput, dayOfHolidays, error_6;
var status, year, month, dayInput, dayOfHolidays, error_5;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
status = false;
year = date ? moment(date, 'jYYYY/jMM/jDD').format('jYYYY') : moment().format('jYYYY');

@@ -217,3 +213,3 @@ month = date ? moment(date, 'jYYYY/jMM/jDD').format('jM') : moment().format('jM');

_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, (0, exports.requestToTime)({ month: month, year: year })];
return [4 /*yield*/, (0, exports.requestToTime)(month, year)];
case 2:

@@ -225,9 +221,6 @@ dayOfHolidays = _a.sent();

}
else {
status = false;
}
return [2 /*return*/, status];
case 3:
error_6 = _a.sent();
throw error_6;
error_5 = _a.sent();
throw error_5;
case 4: return [2 /*return*/];

@@ -239,5 +232,5 @@ }

var updateStaticHolidayDays = function (year) {
if (year === void 0) { year = null; }
if (year === void 0) { year = ''; }
return __awaiter(void 0, void 0, void 0, function () {
var fileName, months, result, _i, months_3, month, dayOfHolidays, converted, error_7, json, error_8;
var fileName, months, result, _i, months_3, month, dayOfHolidays, converted, error_6, json, error_7;
return __generator(this, function (_a) {

@@ -266,4 +259,4 @@ switch (_a.label) {

case 4:
error_7 = _a.sent();
throw error_7;
error_6 = _a.sent();
throw error_6;
case 5:

@@ -277,4 +270,4 @@ _i++;

case 7:
error_8 = _a.sent();
throw error_8;
error_7 = _a.sent();
throw error_7;
case 8: return [2 /*return*/];

@@ -281,0 +274,0 @@ }

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

@@ -16,3 +16,3 @@ "main": "lib/index.js",

"prepare": "npm run build",
"prepublishOnly": "npm test",
"prepublishOnly": "npm test && npm run lint",
"preversion": "npm run lint",

@@ -19,0 +19,0 @@ "version": "npm run format && git add -A src",

@@ -1,1 +0,10 @@

# shamsi-holidays
# shamsi-holidays
```javascript
const {} = require('shamsi-holidays');
domainFinder({
domainNames:["hello"],
tlds: ["com","net"]
})
```

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