@mcma/client
Advanced tools
Comparing version 0.9.5 to 0.9.6
@@ -6,9 +6,2 @@ "use strict"; | ||
const headers_1 = require("./headers"); | ||
const dateFormat = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/; | ||
function reviver(key, value) { | ||
if (typeof value === "string" && dateFormat.test(value)) { | ||
return new Date(value); | ||
} | ||
return value; | ||
} | ||
class HttpClient { | ||
@@ -64,3 +57,3 @@ constructor(authenticator) { | ||
try { | ||
return JSON.parse(data, reviver); | ||
return JSON.parse(data, core_1.Utils.reviver); | ||
} | ||
@@ -67,0 +60,0 @@ catch (_a) { |
@@ -5,9 +5,2 @@ "use strict"; | ||
const http_1 = require("../http"); | ||
const dateFormat = /(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/; | ||
function reviver(key, value) { | ||
if (typeof value === "string" && dateFormat.test(value)) { | ||
return new Date(value); | ||
} | ||
return value; | ||
} | ||
class ResourceEndpointClient { | ||
@@ -56,3 +49,3 @@ constructor(resourceEndpoint, authProvider, serviceAuthType, serviceAuthContext) { | ||
try { | ||
return JSON.parse(data, reviver); | ||
return JSON.parse(data, core_1.Utils.reviver); | ||
} | ||
@@ -59,0 +52,0 @@ catch (_a) { |
{ | ||
"name": "@mcma/client", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "Node module with classes and functions used to access services in an MCMA environment", | ||
@@ -35,6 +35,6 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/core": "0.9.5" | ||
"@mcma/core": "0.9.6" | ||
}, | ||
"devDependencies": { | ||
"@mcma/core": "0.9.5", | ||
"@mcma/core": "0.9.6", | ||
"@types/node": "^13.7.4", | ||
@@ -41,0 +41,0 @@ "jasmine": "^3.3.1" |
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
34133
762