mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 04:26:33 +00:00
Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
e3a345347e | |||
c3be93e6c4 | |||
4cde62af13 |
6 changed files with 1055 additions and 792 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -6,7 +6,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: ['18', '20']
|
||||
node-version: ['18', '20', '22']
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022 Gravity Boulevard, LLC
|
||||
Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Gravity Boulevard, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
5
dist/holidayapi.js
vendored
5
dist/holidayapi.js
vendored
|
@ -49,7 +49,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HolidayAPI = void 0;
|
||||
var node_fetch_1 = require("node-fetch");
|
||||
var url_1 = require("url");
|
||||
var HolidayAPI = (function () {
|
||||
function HolidayAPI(_a) {
|
||||
var key = _a.key, _b = _a.version, version = _b === void 0 ? 1 : _b;
|
||||
|
@ -69,8 +68,8 @@ var HolidayAPI = (function () {
|
|||
}
|
||||
HolidayAPI.prototype.createUrl = function (endpoint, request) {
|
||||
var parameters = __assign({ key: this.key }, request);
|
||||
var url = new url_1.URL(endpoint, this.baseUrl);
|
||||
url.search = new url_1.URLSearchParams(parameters).toString();
|
||||
var url = new URL(endpoint, this.baseUrl);
|
||||
url.search = new URLSearchParams(parameters).toString();
|
||||
return url.toString();
|
||||
};
|
||||
HolidayAPI.prototype.request = function (endpoint, request) {
|
||||
|
|
1833
package-lock.json
generated
1833
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "holidayapi",
|
||||
"version": "7.0.0",
|
||||
"version": "7.1.0",
|
||||
"description": "Official Node.js library for Holiday API",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -26,7 +26,7 @@
|
|||
"devDependencies": {
|
||||
"@types/jest": "^29.5.6",
|
||||
"@types/nock": "^11.1.0",
|
||||
"@types/node": "^20.8.9",
|
||||
"@types/node": "^22.2.0",
|
||||
"@types/node-fetch": "^2.6.7",
|
||||
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
||||
"@typescript-eslint/parser": "^6.9.0",
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
import fetch from 'node-fetch';
|
||||
import { URL, URLSearchParams } from 'url';
|
||||
import {
|
||||
CountriesRequest,
|
||||
CountriesResponse,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue