@lifeomic/axios-fetch
Advanced tools
Comparing version 3.0.1-pr-107-1698935989-1642183152.0 to 3.0.1
{ | ||
"name": "@lifeomic/axios-fetch", | ||
"version": "3.0.1-pr-107-1698935989-1642183152.0", | ||
"version": "3.0.1", | ||
"description": "A WebAPI Fetch implementation backed by an Axios client", | ||
@@ -50,3 +50,3 @@ "main": "src/index.js", | ||
"nock": "^13.1.4", | ||
"node-fetch": "^2.6.1", | ||
"node-fetch": "^2.6.7", | ||
"nyc": "^15.1.0", | ||
@@ -53,0 +53,0 @@ "sinon": "^11.1.2", |
@@ -12,3 +12,3 @@ "use strict"; | ||
exports.createFetchHeaders = createFetchHeaders; | ||
const isHeaders = (headers) => headers.constructor.name === 'Headers'; | ||
const isHeaders = (headers) => { var _a; return ((_a = headers.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Headers'; }; | ||
function createAxiosHeaders(headers = {}) { | ||
@@ -52,2 +52,2 @@ const rawHeaders = {}; | ||
exports.getUrl = getUrl; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZVV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidHlwZVV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQVNBLFNBQWdCLGtCQUFrQixDQUFFLGVBQXVDLEVBQUU7SUFDM0UsTUFBTSxPQUFPLEdBQWUsRUFBRSxDQUFDO0lBQy9CLE1BQU0sQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLEVBQUUsRUFBRTtRQUNyRCxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUM7SUFDOUIsQ0FBQyxDQUFDLENBQUM7SUFDSCxPQUFPLE9BQU8sQ0FBQztBQUNqQixDQUFDO0FBTkQsZ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ders } from 'node-fetch'; | ||
const isHeaders = (headers: HeadersLike): headers is Headers => headers.constructor.name === 'Headers'; | ||
const isHeaders = (headers: HeadersLike): headers is Headers => headers.constructor?.name === 'Headers'; | ||
@@ -21,0 +21,0 @@ export function createAxiosHeaders (headers: HeadersLike = {}): Record<string, string> { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
23091
1