@equinor/echo-base
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -0,1 +1,2 @@ | ||
import { parseJsonWithDate } from './jsonParseUtils'; | ||
export var storage = { | ||
@@ -15,3 +16,3 @@ setItem: function (key, data) { | ||
try { | ||
return JSON.parse(data); | ||
return parseJsonWithDate(data); | ||
} | ||
@@ -18,0 +19,0 @@ catch (_a) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.storage = void 0; | ||
var jsonParseUtils_1 = require("./jsonParseUtils"); | ||
exports.storage = { | ||
@@ -18,3 +19,3 @@ setItem: function (key, data) { | ||
try { | ||
return JSON.parse(data); | ||
return (0, jsonParseUtils_1.parseJsonWithDate)(data); | ||
} | ||
@@ -21,0 +22,0 @@ catch (_a) { |
{ | ||
"name": "@equinor/echo-base", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"module": "esm/index.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import { EchoLocalStorage } from '../types/storage'; | ||
import { parseJsonWithDate } from './jsonParseUtils'; | ||
@@ -17,3 +18,3 @@ export const storage: EchoLocalStorage = { | ||
try { | ||
return JSON.parse(data) as T; | ||
return parseJsonWithDate(data) as T; | ||
} catch { | ||
@@ -20,0 +21,0 @@ return data; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
249512
246
5124