@pnp/core
Advanced tools
Comparing version 3.0.0-v3nightly.20220108 to 3.0.0-v3nightly.20220109
{ | ||
"name": "@pnp/core", | ||
"version": "3.0.0-v3nightly.20220108", | ||
"version": "3.0.0-v3nightly.20220109", | ||
"description": "pnp - provides shared functionality across all pnp libraries", | ||
@@ -10,2 +10,10 @@ "main": "./index.js", | ||
}, | ||
"funding": { | ||
"type": "individual", | ||
"url": "https://github.com/sponsors/patrick-rodgers/" | ||
}, | ||
"type": "module", | ||
"engines": { | ||
"node": ">=14.15.1" | ||
}, | ||
"author": { | ||
@@ -22,8 +30,3 @@ "name": "Microsoft and other contributors" | ||
"url": "git:github.com/pnp/pnpjs" | ||
}, | ||
"funding": { | ||
"type": "individual", | ||
"url": "https://github.com/sponsors/patrick-rodgers/" | ||
}, | ||
"type": "module" | ||
} | ||
} |
import { dateAdd, jsS, objectDefinedNotNull } from "./util.js"; | ||
let storageShim; | ||
function getStorageShim() { | ||
if (typeof storageShim === "undefined") { | ||
storageShim = new MemoryStorage(); | ||
} | ||
return storageShim; | ||
} | ||
/** | ||
@@ -164,3 +171,3 @@ * A wrapper class to provide a consistent interface to browser based storage | ||
if (this._local === null) { | ||
this._local = new PnPClientStorageWrapper(typeof localStorage === "undefined" ? new MemoryStorage() : localStorage); | ||
this._local = new PnPClientStorageWrapper(typeof localStorage === "undefined" ? getStorageShim() : localStorage); | ||
} | ||
@@ -174,3 +181,3 @@ return this._local; | ||
if (this._session === null) { | ||
this._session = new PnPClientStorageWrapper(typeof sessionStorage === "undefined" ? new MemoryStorage() : sessionStorage); | ||
this._session = new PnPClientStorageWrapper(typeof sessionStorage === "undefined" ? getStorageShim() : sessionStorage); | ||
} | ||
@@ -177,0 +184,0 @@ return this._session; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
78412
1255