Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngx-pwa/local-storage

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngx-pwa/local-storage - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

2

bundles/ngx-pwa-local-storage.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@ngx-pwa/local-storage",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t((e["ngx-pwa"]=e["ngx-pwa"]||{},e["ngx-pwa"]["local-storage"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,r,s,c,n){"use strict";var o=new r.InjectionToken("localStoragePrefix",{providedIn:"root",factory:function(){return""}});var i=function(){function e(e){void 0===e&&(e=null),this.userPrefix=e,this.prefix="",e&&(this.prefix=e+"_")}return e.prototype.getItem=function(e){var t=localStorage.getItem(""+this.prefix+e),r=null;if(null!=t)try{r=JSON.parse(t)}catch(n){return s.throwError(new Error("Invalid data in localStorage."))}return s.of(r)},e.prototype.setItem=function(e,t){return localStorage.setItem(""+this.prefix+e,JSON.stringify(t)),s.of(!0)},e.prototype.removeItem=function(e){return localStorage.removeItem(""+this.prefix+e),s.of(!0)},e.prototype.clear=function(){return localStorage.clear(),s.of(!0)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[o]}]}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(o,8))},token:e,providedIn:"root"}),e}(),a=function(){function e(e){void 0===e&&(e=null),this.prefix=e,this.dbName="ngStorage",this.objectStoreName="localStorage",this.keyPath="key",this.dataPath="value",this.fallback=null,e&&(this.dbName=e+"_"+this.dbName),this.database=new s.ReplaySubject,this.connect(e)}return e.prototype.getItem=function(e){return this.fallback?this.fallback.getItem(e):this.getItemFromTransaction(e)},e.prototype.getItemFromTransaction=function(t,e){var r=this;return(e?s.of(e):this.transaction()).pipe(c.map(function(e){return e.get(t)}),c.mergeMap(function(e){var t=s.fromEvent(e,"success").pipe(c.map(function(e){return e.target.result}),c.map(function(e){return e&&r.dataPath in e?e[r.dataPath]:null}));return s.race(t,r.toErrorObservable(e,"getter")).pipe(c.first())}),c.first())},e.prototype.setItem=function(o,i){var a,u=this;return this.fallback?this.fallback.setItem(o,i):null==i?s.of(!0):this.transaction("readwrite").pipe(c.tap(function(e){a=e}),c.mergeMap(function(){return u.getItemFromTransaction(o,a)}),c.map(function(e){return null==e?"add":"put"}),c.mergeMap(function(e){var t,r,n;switch(e){case"add":t=a.add(((r={})[u.dataPath]=i,r),o);break;case"put":default:t=a.put(((n={})[u.dataPath]=i,n),o)}return s.race(u.toSuccessObservable(t),u.toErrorObservable(t,"setter")).pipe(c.first())}),c.first())},e.prototype.removeItem=function(r){var n=this;return this.fallback?this.fallback.removeItem(r):this.getItem(r).pipe(c.mergeMap(function(e){return null!=e?n.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e["delete"](r);return s.race(n.toSuccessObservable(t),n.toErrorObservable(t,"remover")).pipe(c.first())})):s.of(!0)}),c.first())},e.prototype.clear=function(){var r=this;return this.fallback?this.fallback.clear():this.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e.clear();return s.race(r.toSuccessObservable(t),r.toErrorObservable(t,"clearer")).pipe(c.first())}),c.first())},e.prototype.connect=function(e){var t,r=this;void 0===e&&(e=null);try{t=indexedDB.open(this.dbName)}catch(o){return void this.setFallback(e)}s.fromEvent(t,"upgradeneeded").pipe(c.first()).subscribe(function(e){var t=e.target.result;t.objectStoreNames.contains(r.objectStoreName)||t.createObjectStore(r.objectStoreName)});var n=s.fromEvent(t,"success");s.race(n,this.toErrorObservable(t,"connection")).pipe(c.first()).subscribe(function(e){r.database.next(e.target.result)},function(){r.setFallback(e)})},e.prototype.transaction=function(t){var r=this;return void 0===t&&(t="readonly"),this.database.pipe(c.map(function(e){return e.transaction([r.objectStoreName],t).objectStore(r.objectStoreName)}))},e.prototype.toSuccessObservable=function(e){return s.fromEvent(e,"success").pipe(c.map(function(){return!0}))},e.prototype.toErrorObservable=function(e,t){return void 0===t&&(t=""),s.fromEvent(e,"error").pipe(c.mergeMap(function(){return s.throwError(new Error("IndexedDB "+t+" issue : "+e.error.message+"."))}))},e.prototype.setFallback=function(e){this.fallback=new i(e)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[o]}]}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(o,8))},token:e,providedIn:"root"}),e}(),u=function(){function e(){this.localStorage=new Map}return e.prototype.getItem=function(e){var t=this.localStorage.get(e);return s.of(t!==undefined?t:null)},e.prototype.setItem=function(e,t){return this.localStorage.set(e,t),s.of(!0)},e.prototype.removeItem=function(e){return this.localStorage["delete"](e),s.of(!0)},e.prototype.clear=function(){return this.localStorage.clear(),s.of(!0)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e},token:e,providedIn:"root"}),e}();function l(e,t){return n.isPlatformBrowser(e)&&"indexedDB"in window&&indexedDB!==undefined&&null!==indexedDB?new a(t):n.isPlatformBrowser(e)&&"localStorage"in window&&localStorage!==undefined&&null!==localStorage?new i(t):new u}var p=function(){function e(){}return e.decorators=[{type:r.Injectable,args:[{providedIn:"root",useFactory:l,deps:[r.PLATFORM_ID,[new r.Optional,o]]}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return l(r.inject(r.PLATFORM_ID),r.inject(o,8))},token:e,providedIn:"root"}),e}();function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var m=function(){function e(){}return e.prototype.validate=function(e,t){if(!((t.hasOwnProperty("const")&&t["const"]!==undefined||t.hasOwnProperty("enum")&&null!=t["enum"]||t.hasOwnProperty("type")&&null!=t.type)&&"array"!==t.type&&"object"!==t.type||t.hasOwnProperty("properties")&&null!=t.properties||t.hasOwnProperty("items")&&null!=t.items))throw new Error("Each value must have a 'type' or 'properties' or 'items' or 'const' or 'enum', to enforce strict types.");return(!t.hasOwnProperty("const")||t["const"]===undefined||e===t["const"])&&(!!this.validateEnum(e,t)&&(!!this.validateType(e,t)&&(!!this.validateItems(e,t)&&(!!this.validateProperties(e,t)&&!!this.validateRequired(e,t)))))},e.prototype.isObjectNotNull=function(e){return null!==e&&"object"==typeof e},e.prototype.validateProperties=function(e,t){if(!t.hasOwnProperty("properties")||null==t.properties)return!0;if(!this.isObjectNotNull(e))return!1;if(Object.keys(t.properties).length!==Object.keys(e).length)return!1;for(var r in t.properties)if(t.properties.hasOwnProperty(r)&&e.hasOwnProperty(r)&&!this.validate(e[r],t.properties[r]))return!1;return!0},e.prototype.validateRequired=function(e,t){if(!t.hasOwnProperty("required")||null==t.required)return!0;if(!this.isObjectNotNull(e))return!1;try{for(var r=f(t.required),n=r.next();!n.done;n=r.next()){var o=n.value;if(!t.properties||!t.properties.hasOwnProperty(o))throw new Error("'required' properties must be described in 'properties' too.");if(!e.hasOwnProperty(o))return!1}}catch(u){i={error:u}}finally{try{n&&!n.done&&(a=r["return"])&&a.call(r)}finally{if(i)throw i.error}}return!0;var i,a},e.prototype.validateEnum=function(e,t){return!t.hasOwnProperty("enum")||null==t["enum"]||-1!==t["enum"].indexOf(e)},e.prototype.validateType=function(e,t){if(!t.hasOwnProperty("type")||null==t.type)return!0;switch(t.type){case"null":return null===e;case"string":return this.validateString(e,t);case"number":case"integer":return this.validateNumber(e,t);case"boolean":return"boolean"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e)}},e.prototype.validateItems=function(e,t){if(!t.hasOwnProperty("items")||null==t.items)return!0;if(!Array.isArray(e))return!1;if(t.hasOwnProperty("maxItems")&&null!=t.maxItems){if(!Number.isInteger(t.maxItems)||t.maxItems<0)throw new Error("'maxItems' must be a non-negative integer.");if(e.length>t.maxItems)return!1}if(t.hasOwnProperty("minItems")&&null!=t.minItems){if(!Number.isInteger(t.minItems)||t.minItems<0)throw new Error("'minItems' must be a non-negative integer.");if(e.length<t.minItems)return!1}if(t.hasOwnProperty("uniqueItems")&&null!=t.uniqueItems&&t.uniqueItems){var r=new Set(e);if(e.length!==r.size)return!1}if(Array.isArray(t.items))return this.validateItemsList(e,t);try{for(var n=f(e),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.validate(i,t.items))return!1}}catch(s){a={error:s}}finally{try{o&&!o.done&&(u=n["return"])&&u.call(n)}finally{if(a)throw a.error}}return!0;var a,u},e.prototype.validateItemsList=function(e,t){var r=t.items;if(e.length!==r.length)return!1;for(var n=0;n<r.length;n+=1)if(!this.validate(e[n],r[n]))return!1;return!0},e.prototype.validateString=function(e,t){if("string"!=typeof e)return!1;if(t.hasOwnProperty("maxLength")&&null!=t.maxLength){if(!Number.isInteger(t.maxLength)||t.maxLength<0)throw new Error("'maxLength' must be a non-negative integer.");if(e.length>t.maxLength)return!1}if(t.hasOwnProperty("minLength")&&null!=t.minLength){if(!Number.isInteger(t.minLength)||t.minLength<0)throw new Error("'minLength' must be a non-negative integer.");if(e.length<t.minLength)return!1}if(t.hasOwnProperty("pattern")&&null!=t.pattern&&!new RegExp(t.pattern).test(e))return!1;return!0},e.prototype.validateNumber=function(e,t){if("number"!=typeof e)return!1;if("integer"===t.type&&!Number.isInteger(e))return!1;if(t.hasOwnProperty("multipleOf")&&null!=t.multipleOf){if(t.multipleOf<=0)throw new Error("'multipleOf' must be a number strictly greater than 0.");if(!Number.isInteger(e/t.multipleOf))return!1}return!(t.hasOwnProperty("maximum")&&null!=t.maximum&&e>t.maximum)&&(!(t.hasOwnProperty("exclusiveMaximum")&&null!=t.exclusiveMaximum&&e>=t.exclusiveMaximum)&&(!(t.hasOwnProperty("minimum")&&null!=t.minimum&&e<t.minimum)&&!(t.hasOwnProperty("exclusiveMinimum")&&null!=t.exclusiveMinimum&&e<=t.exclusiveMinimum)))},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e},token:e,providedIn:"root"}),e}(),t=function(){function e(e,t){this.database=e,this.jsonValidator=t,this.getItemOptionsDefault={schema:null}}return e.prototype.getItem=function(e,n){var o=this;return void 0===n&&(n=this.getItemOptionsDefault),this.database.getItem(e).pipe(c.mergeMap(function(e){if(n.schema&&null!==e){var t=!0;try{t=o.jsonValidator.validate(e,n.schema)}catch(r){return s.throwError(r)}if(!t)return s.throwError(new Error("JSON invalid"))}return s.of(e)}))},e.prototype.setItem=function(e,t){return this.database.setItem(e,t)},e.prototype.removeItem=function(e){return this.database.removeItem(e)},e.prototype.clear=function(){return this.database.clear()},e.prototype.setItemSubscribe=function(e,t){this.setItem(e,t).subscribe(function(){},function(){})},e.prototype.removeItemSubscribe=function(e){this.removeItem(e).subscribe(function(){},function(){})},e.prototype.clearSubscribe=function(){this.clear().subscribe(function(){},function(){})},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:p},{type:m}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(p),r.inject(m))},token:e,providedIn:"root"}),e}();e.LocalDatabase=p,e.IndexedDBDatabase=a,e.LocalStorageDatabase=i,e.MockLocalDatabase=u,e.JSONValidator=m,e.LocalStorage=t,e.localStorageProviders=function d(e){return[e.prefix?{provide:o,useValue:e.prefix}:[]]},e.LOCAL_STORAGE_PREFIX=o,e.ɵa=l,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@ngx-pwa/local-storage",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t((e["ngx-pwa"]=e["ngx-pwa"]||{},e["ngx-pwa"]["local-storage"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,r,s,c,n){"use strict";var o=new r.InjectionToken("localStoragePrefix",{providedIn:"root",factory:function(){return""}});var i=function(){function e(e){void 0===e&&(e=null),this.userPrefix=e,this.prefix="",e&&(this.prefix=e+"_")}return e.prototype.getItem=function(e){var t=localStorage.getItem(""+this.prefix+e),r=null;if(null!=t)try{r=JSON.parse(t)}catch(n){return s.throwError(new Error("Invalid data in localStorage."))}return s.of(r)},e.prototype.setItem=function(e,t){return localStorage.setItem(""+this.prefix+e,JSON.stringify(t)),s.of(!0)},e.prototype.removeItem=function(e){return localStorage.removeItem(""+this.prefix+e),s.of(!0)},e.prototype.clear=function(){return localStorage.clear(),s.of(!0)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[o]}]}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(o,8))},token:e,providedIn:"root"}),e}(),a=function(){function e(e){void 0===e&&(e=null),this.prefix=e,this.dbName="ngStorage",this.objectStoreName="localStorage",this.keyPath="key",this.dataPath="value",this.fallback=null,e&&(this.dbName=e+"_"+this.dbName),this.database=new s.ReplaySubject,this.connect(e)}return e.prototype.getItem=function(e){return this.fallback?this.fallback.getItem(e):this.getItemFromTransaction(e)},e.prototype.getItemFromTransaction=function(t,e){var r=this;return(e?s.of(e):this.transaction()).pipe(c.map(function(e){return e.get(t)}),c.mergeMap(function(e){var t=s.fromEvent(e,"success").pipe(c.map(function(e){return e.target.result}),c.map(function(e){return e&&r.dataPath in e?e[r.dataPath]:null}));return s.race(t,r.toErrorObservable(e,"getter")).pipe(c.first())}),c.first())},e.prototype.setItem=function(o,i){var a,u=this;return this.fallback?this.fallback.setItem(o,i):null==i?s.of(!0):this.transaction("readwrite").pipe(c.tap(function(e){a=e}),c.mergeMap(function(){return u.getItemFromTransaction(o,a)}),c.map(function(e){return null==e?"add":"put"}),c.mergeMap(function(e){var t,r,n;switch(e){case"add":t=a.add(((r={})[u.dataPath]=i,r),o);break;case"put":default:t=a.put(((n={})[u.dataPath]=i,n),o)}return s.race(u.toSuccessObservable(t),u.toErrorObservable(t,"setter")).pipe(c.first())}),c.first())},e.prototype.removeItem=function(r){var n=this;return this.fallback?this.fallback.removeItem(r):this.getItem(r).pipe(c.mergeMap(function(e){return null!=e?n.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e["delete"](r);return s.race(n.toSuccessObservable(t),n.toErrorObservable(t,"remover")).pipe(c.first())})):s.of(!0)}),c.first())},e.prototype.clear=function(){var r=this;return this.fallback?this.fallback.clear():this.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e.clear();return s.race(r.toSuccessObservable(t),r.toErrorObservable(t,"clearer")).pipe(c.first())}),c.first())},e.prototype.connect=function(e){var t,r=this;void 0===e&&(e=null);try{t=indexedDB.open(this.dbName)}catch(o){return void this.setFallback(e)}s.fromEvent(t,"upgradeneeded").pipe(c.first()).subscribe(function(e){var t=e.target.result;t.objectStoreNames.contains(r.objectStoreName)||t.createObjectStore(r.objectStoreName)});var n=s.fromEvent(t,"success");s.race(n,this.toErrorObservable(t,"connection")).pipe(c.first()).subscribe(function(e){r.database.next(e.target.result)},function(){r.setFallback(e)})},e.prototype.transaction=function(t){var r=this;return void 0===t&&(t="readonly"),this.database.pipe(c.map(function(e){return e.transaction([r.objectStoreName],t).objectStore(r.objectStoreName)}))},e.prototype.toSuccessObservable=function(e){return s.fromEvent(e,"success").pipe(c.map(function(){return!0}))},e.prototype.toErrorObservable=function(e,t){return void 0===t&&(t=""),s.fromEvent(e,"error").pipe(c.mergeMap(function(){return s.throwError(new Error("IndexedDB "+t+" issue : "+e.error.message+"."))}))},e.prototype.setFallback=function(e){this.fallback=new i(e)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:r.Optional},{type:r.Inject,args:[o]}]}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(o,8))},token:e,providedIn:"root"}),e}(),u=function(){function e(){this.localStorage=new Map}return e.prototype.getItem=function(e){var t=this.localStorage.get(e);return s.of(t!==undefined?t:null)},e.prototype.setItem=function(e,t){return this.localStorage.set(e,t),s.of(!0)},e.prototype.removeItem=function(e){return this.localStorage["delete"](e),s.of(!0)},e.prototype.clear=function(){return this.localStorage.clear(),s.of(!0)},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e},token:e,providedIn:"root"}),e}();function l(e,t){return n.isPlatformBrowser(e)&&"indexedDB"in window&&indexedDB!==undefined&&null!==indexedDB?new a(t):n.isPlatformBrowser(e)&&"localStorage"in window&&localStorage!==undefined&&null!==localStorage?new i(t):new u}var p=function(){function e(){}return e.decorators=[{type:r.Injectable,args:[{providedIn:"root",useFactory:l,deps:[r.PLATFORM_ID,[new r.Optional,o]]}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return l(r.inject(r.PLATFORM_ID),r.inject(o,8))},token:e,providedIn:"root"}),e}();function f(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var m=function(){function e(){}return e.prototype.validate=function(e,t){if(!((t.hasOwnProperty("const")&&t["const"]!==undefined||t.hasOwnProperty("enum")&&null!=t["enum"]||t.hasOwnProperty("type")&&null!=t.type)&&"array"!==t.type&&"object"!==t.type||t.hasOwnProperty("properties")&&null!=t.properties||t.hasOwnProperty("items")&&null!=t.items))throw new Error("Each value must have a 'type' or 'properties' or 'items' or 'const' or 'enum', to enforce strict types.");return(!t.hasOwnProperty("const")||t["const"]===undefined||e===t["const"])&&(!!this.validateEnum(e,t)&&(!!this.validateType(e,t)&&(!!this.validateItems(e,t)&&(!!this.validateProperties(e,t)&&!!this.validateRequired(e,t)))))},e.prototype.isObjectNotNull=function(e){return null!==e&&"object"==typeof e},e.prototype.validateProperties=function(e,t){if(!t.hasOwnProperty("properties")||null==t.properties)return!0;if(!this.isObjectNotNull(e))return!1;if(Object.keys(t.properties).length<Object.keys(e).length)return!1;for(var r in t.properties)if(t.properties.hasOwnProperty(r)&&e.hasOwnProperty(r)&&!this.validate(e[r],t.properties[r]))return!1;return!0},e.prototype.validateRequired=function(e,t){if(!t.hasOwnProperty("required")||null==t.required)return!0;if(!this.isObjectNotNull(e))return!1;try{for(var r=f(t.required),n=r.next();!n.done;n=r.next()){var o=n.value;if(!t.properties||!t.properties.hasOwnProperty(o))throw new Error("'required' properties must be described in 'properties' too.");if(!e.hasOwnProperty(o))return!1}}catch(u){i={error:u}}finally{try{n&&!n.done&&(a=r["return"])&&a.call(r)}finally{if(i)throw i.error}}return!0;var i,a},e.prototype.validateEnum=function(e,t){return!t.hasOwnProperty("enum")||null==t["enum"]||-1!==t["enum"].indexOf(e)},e.prototype.validateType=function(e,t){if(!t.hasOwnProperty("type")||null==t.type)return!0;switch(t.type){case"null":return null===e;case"string":return this.validateString(e,t);case"number":case"integer":return this.validateNumber(e,t);case"boolean":return"boolean"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e)}},e.prototype.validateItems=function(e,t){if(!t.hasOwnProperty("items")||null==t.items)return!0;if(!Array.isArray(e))return!1;if(t.hasOwnProperty("maxItems")&&null!=t.maxItems){if(!Number.isInteger(t.maxItems)||t.maxItems<0)throw new Error("'maxItems' must be a non-negative integer.");if(e.length>t.maxItems)return!1}if(t.hasOwnProperty("minItems")&&null!=t.minItems){if(!Number.isInteger(t.minItems)||t.minItems<0)throw new Error("'minItems' must be a non-negative integer.");if(e.length<t.minItems)return!1}if(t.hasOwnProperty("uniqueItems")&&null!=t.uniqueItems&&t.uniqueItems){var r=new Set(e);if(e.length!==r.size)return!1}if(Array.isArray(t.items))return this.validateItemsList(e,t);try{for(var n=f(e),o=n.next();!o.done;o=n.next()){var i=o.value;if(!this.validate(i,t.items))return!1}}catch(s){a={error:s}}finally{try{o&&!o.done&&(u=n["return"])&&u.call(n)}finally{if(a)throw a.error}}return!0;var a,u},e.prototype.validateItemsList=function(e,t){var r=t.items;if(e.length!==r.length)return!1;for(var n=0;n<r.length;n+=1)if(!this.validate(e[n],r[n]))return!1;return!0},e.prototype.validateString=function(e,t){if("string"!=typeof e)return!1;if(t.hasOwnProperty("maxLength")&&null!=t.maxLength){if(!Number.isInteger(t.maxLength)||t.maxLength<0)throw new Error("'maxLength' must be a non-negative integer.");if(e.length>t.maxLength)return!1}if(t.hasOwnProperty("minLength")&&null!=t.minLength){if(!Number.isInteger(t.minLength)||t.minLength<0)throw new Error("'minLength' must be a non-negative integer.");if(e.length<t.minLength)return!1}if(t.hasOwnProperty("pattern")&&null!=t.pattern&&!new RegExp(t.pattern).test(e))return!1;return!0},e.prototype.validateNumber=function(e,t){if("number"!=typeof e)return!1;if("integer"===t.type&&!Number.isInteger(e))return!1;if(t.hasOwnProperty("multipleOf")&&null!=t.multipleOf){if(t.multipleOf<=0)throw new Error("'multipleOf' must be a number strictly greater than 0.");if(!Number.isInteger(e/t.multipleOf))return!1}return!(t.hasOwnProperty("maximum")&&null!=t.maximum&&e>t.maximum)&&(!(t.hasOwnProperty("exclusiveMaximum")&&null!=t.exclusiveMaximum&&e>=t.exclusiveMaximum)&&(!(t.hasOwnProperty("minimum")&&null!=t.minimum&&e<t.minimum)&&!(t.hasOwnProperty("exclusiveMinimum")&&null!=t.exclusiveMinimum&&e<=t.exclusiveMinimum)))},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e},token:e,providedIn:"root"}),e}(),t=function(){function e(e,t){this.database=e,this.jsonValidator=t,this.getItemOptionsDefault={schema:null}}return e.prototype.getItem=function(e,n){var o=this;return void 0===n&&(n=this.getItemOptionsDefault),this.database.getItem(e).pipe(c.mergeMap(function(e){if(n.schema&&null!==e){var t=!0;try{t=o.jsonValidator.validate(e,n.schema)}catch(r){return s.throwError(r)}if(!t)return s.throwError(new Error("JSON invalid"))}return s.of(e)}))},e.prototype.setItem=function(e,t){return this.database.setItem(e,t)},e.prototype.removeItem=function(e){return this.database.removeItem(e)},e.prototype.clear=function(){return this.database.clear()},e.prototype.setItemSubscribe=function(e,t){this.setItem(e,t).subscribe(function(){},function(){})},e.prototype.removeItemSubscribe=function(e){this.removeItem(e).subscribe(function(){},function(){})},e.prototype.clearSubscribe=function(){this.clear().subscribe(function(){},function(){})},e.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:p},{type:m}]},e.ngInjectableDef=r.defineInjectable({factory:function t(){return new e(r.inject(p),r.inject(m))},token:e,providedIn:"root"}),e}();e.LocalDatabase=p,e.IndexedDBDatabase=a,e.LocalStorageDatabase=i,e.MockLocalDatabase=u,e.JSONValidator=m,e.LocalStorage=t,e.localStorageProviders=function d(e){return[e.prefix?{provide:o,useValue:e.prefix}:[]]},e.LOCAL_STORAGE_PREFIX=o,e.ɵa=l,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-pwa-local-storage.umd.min.js.map

@@ -72,3 +72,3 @@ /**

*/
if (Object.keys(schema.properties).length !== Object.keys(data).length) {
if (Object.keys(schema.properties).length < Object.keys(data).length) {
return false;

@@ -293,2 +293,2 @@ }

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL3ZhbGlkYXRpb24vanNvbi12YWxpZGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBR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KSB7XG5cbiAgICAgIGlmIChkYXRhID4gc2NoZW1hLm1heGltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgaWYgKHNjaGVtYS5oYXNPd25Qcm9wZXJ0eSgnZXhjbHVzaXZlTWF4aW11bScpICYmIChzY2hlbWEuZXhjbHVzaXZlTWF4aW11bSAhPSBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA+PSBzY2hlbWEuZXhjbHVzaXZlTWF4aW11bSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICB9XG5cbiAgICBpZiAoc2NoZW1hLmhhc093blByb3BlcnR5KCdtaW5pbXVtJykgJiYgKHNjaGVtYS5taW5pbXVtICE9IG51bGwpKSB7XG5cbiAgICAgIGlmIChkYXRhIDwgc2NoZW1hLm1pbmltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgaWYgKHNjaGVtYS5oYXNPd25Qcm9wZXJ0eSgnZXhjbHVzaXZlTWluaW11bScpICYmIChzY2hlbWEuZXhjbHVzaXZlTWluaW11bSAhPSBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA8PSBzY2hlbWEuZXhjbHVzaXZlTWluaW11bSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICB9XG5cbiAgICByZXR1cm4gdHJ1ZTtcblxuICB9XG5cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL3ZhbGlkYXRpb24vanNvbi12YWxpZGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSx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4gICAgICBpZiAoZGF0YSA+IHNjaGVtYS5tYXhpbXVtKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cblxuICAgIH1cblxuICAgIGlmIChzY2hlbWEuaGFzT3duUHJvcGVydHkoJ2V4Y2x1c2l2ZU1heGltdW0nKSAmJiAoc2NoZW1hLmV4Y2x1c2l2ZU1heGltdW0gIT0gbnVsbCkpIHtcblxuICAgICAgaWYgKGRhdGEgPj0gc2NoZW1hLmV4Y2x1c2l2ZU1heGltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgaWYgKHNjaGVtYS5oYXNPd25Qcm9wZXJ0eSgnbWluaW11bScpICYmIChzY2hlbWEubWluaW11bSAhPSBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA8IHNjaGVtYS5taW5pbXVtKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cblxuICAgIH1cblxuICAgIGlmIChzY2hlbWEuaGFzT3duUHJvcGVydHkoJ2V4Y2x1c2l2ZU1pbmltdW0nKSAmJiAoc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0gIT0gbnVsbCkpIHtcblxuICAgICAgaWYgKGRhdGEgPD0gc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG5cbiAgfVxuXG59XG4iXX0=

@@ -104,3 +104,3 @@ /**

*/
if (Object.keys(schema.properties).length !== Object.keys(data).length) {
if (Object.keys(schema.properties).length < Object.keys(data).length) {
return false;

@@ -384,2 +384,2 @@ }

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdX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SBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA+PSBzY2hlbWEuZXhjbHVzaXZlTWF4aW11bSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICB9XG5cbiAgICBpZiAoc2NoZW1hLmhhc093blByb3BlcnR5KCdtaW5pbXVtJykgJiYgKHNjaGVtYS5taW5pbXVtICE9IG51bGwpKSB7XG5cbiAgICAgIGlmIChkYXRhIDwgc2NoZW1hLm1pbmltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgaWYgKHNjaGVtYS5oYXNPd25Qcm9wZXJ0eSgnZXhjbHVzaXZlTWluaW11bScpICYmIChzY2hlbWEuZXhjbHVzaXZlTWluaW11bSAhPSBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA8PSBzY2hlbWEuZXhjbHVzaXZlTWluaW11bSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICB9XG5cbiAgICByZXR1cm4gdHJ1ZTtcblxuICB9XG5cbn1cbiJdfQ==
{
"name": "@ngx-pwa/local-storage",
"version": "6.2.0",
"version": "6.2.1",
"description": "Efficient local storage module for Angular apps and PWA: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.",

@@ -5,0 +5,0 @@ "author": "Cyrille Tuzi",

Sorry, the diff of this file is too big to display

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc