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

@jbouduin/holidays-http

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jbouduin/holidays-http - npm Package Compare versions

Comparing version 0.0.1-alpha.4 to 0.0.1

lib/file-provider.d.ts

13

lib/holidays-http.d.ts
import { IHierarchy, IHoliday } from '@jbouduin/holidays-lib';
import { IHolidays } from '@jbouduin/holidays-lib';
import { AxiosRequestConfig } from "axios";
export declare class HolidaysHttp implements IHolidays {
constructor(language?: string);
private hierarchyCalculator;
/**
*
* @param host The host name
* @param assetsDirectory the assets root directory
* @param options any Axios Request configuration you want to pass
* @param language Optional. If not specified, the system falls back to 'en'
*/
constructor(host: string, assetsDirectory: string, options?: AxiosRequestConfig, language?: string);
getHierarchyTree(): Promise<Array<IHierarchy>>;
getHolidays(path: string, year: number, deep?: boolean | undefined): Promise<Array<IHoliday>>;
getHolidays(path: string, year: number, deep: boolean): Promise<Array<IHoliday>>;
getSupportedLanguages(): Promise<Array<string>>;
}
//# sourceMappingURL=holidays-http.d.ts.map

30

lib/holidays-http.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HolidaysHttp = void 0;
var holidays_lib_1 = require("@jbouduin/holidays-lib");
var file_provider_1 = require("./file-provider");
var HolidaysHttp = /** @class */ (function () {
// <editor-fold desc='private properties'>
// private hierarchyCalculator: IHierarchyCalculator;
// </editor-fold>
// <editor-fold desc='Constructor & C°'>
function HolidaysHttp(language) {
// this.hierarchyCalculator = new HierarchyCalculator(language || 'en_GB');
//#endregion
//#region Constructor & C° --------------------------------------------------
/**
*
* @param host The host name
* @param assetsDirectory the assets root directory
* @param options any Axios Request configuration you want to pass
* @param language Optional. If not specified, the system falls back to 'en'
*/
function HolidaysHttp(host, assetsDirectory, options, language) {
if (options === void 0) { options = {}; }
this.hierarchyCalculator = new holidays_lib_1.HierarchyCalculator(language || 'en', new file_provider_1.FileProvider(host, assetsDirectory, options));
}
// </editor-fold>
// <editor-fold desc='IHolidays interface methods'>
//#endregion
//#region IHolidays interface methods ---------------------------------------
HolidaysHttp.prototype.getHierarchyTree = function () {
return Promise.resolve(new Array());
return this.hierarchyCalculator.getHierarchyTree();
};
HolidaysHttp.prototype.getHolidays = function (path, year, deep) {
return Promise.resolve(new Array());
return this.hierarchyCalculator.getHolidays(path, year, deep);
};
HolidaysHttp.prototype.getSupportedLanguages = function () {
return Promise.resolve(new Array());
return this.hierarchyCalculator.getSupportedLanguages();
};

@@ -23,0 +31,0 @@ return HolidaysHttp;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -10,5 +14,5 @@ if (k2 === undefined) k2 = k;

var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./holidays-http"), exports);
{
"name": "@jbouduin/holidays-http",
"version": "0.0.1-alpha.4",
"version": "0.0.1",
"description": "",

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

"build:package": "tsc",
"lint": "tslint -p tsconfig.json",
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"test": "echo \"Error: run tests from root\" && exit 1"

@@ -23,3 +23,4 @@ },

"dependencies": {
"@jbouduin/holidays-lib": "^0.0.1-alpha.4"
"@jbouduin/holidays-lib": "^0.0.1",
"axios": "^0.26.1"
},

@@ -29,3 +30,3 @@ "publishConfig": {

},
"gitHead": "bffd3910002609e8cb08ff1b929208d11524d2fc"
"gitHead": "fccb7e293192e80e53ffacad72dabdc5545b63d9"
}

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