ng2-webstorage
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -202,14 +202,15 @@ (function (global, factory) { | ||
return STORAGEAVAILABILITY[sType]; | ||
var isAvailable = true, storage = this.getWStorage(sType); | ||
if (typeof storage === 'object') { | ||
try { | ||
var isAvailable = true, storage; | ||
try { | ||
storage = this.getWStorage(sType); | ||
if (typeof storage === 'object') { | ||
storage.setItem('test-storage', 'foobar'); | ||
storage.removeItem('test-storage'); | ||
} | ||
catch (e) { | ||
else | ||
isAvailable = false; | ||
} | ||
} | ||
else | ||
catch (e) { | ||
isAvailable = false; | ||
} | ||
if (!isAvailable) | ||
@@ -421,2 +422,2 @@ console.warn(STORAGE_NAMES[sType] + " storage unavailable, Ng2Webstorage will use a fallback strategy instead"); | ||
}))); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS51bWQuanMiLCJzb3VyY2VzIjpbIi4uL2Rpc3QvZW51bXMvc3RvcmFnZS5qcyIsIi4uL2Rpc3QvY29uc3RhbnRzL2xpYi5qcyIsIi4uL2Rpc3QvaGVscGVycy9rZXlTdG9yYWdlLmpzIiwiLi4vZGlzdC9oZWxwZXJzL3N0b3JhZ2VPYnNlcnZlci5qcyIsIi4uL2Rpc3QvaGVscGVycy9tb2NrU3RvcmFnZS5qcyIsIi4uL2Rpc3QvaGVscGVycy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9zZXJ2aWNlcy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9zZXJ2aWNlcy9sb2NhbFN0b3JhZ2UuanMiLCIuLi9kaXN0L3NlcnZpY2VzL3Nlc3Npb25TdG9yYWdlLmpzIiwiLi4vZGlzdC9pbnRlcmZhY2VzL2NvbmZpZy5qcyIsIi4uL2Rpc3QvZGVjb3JhdG9ycy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9kZWNvcmF0b3JzL2xvY2FsU3RvcmFnZS5qcyIsIi4uL2Rpc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ICBpZiAoIXRoaXMubW9ja1N0b3JhZ2VzW3NUeXBlXSlcclxuICAgICAgICAgICAgdGhpcy5tb2NrU3RvcmFnZXNbc1R5cGVdID0gTW9ja1N0b3JhZ2VIZWxwZXIuZ2VuZXJhdGVTdG9yYWdlKCk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMubW9ja1N0b3JhZ2VzW3NUeXBlXTtcclxuICAgIH07XHJcbiAgICBNb2NrU3RvcmFnZUhlbHBlci5nZW5lcmF0ZVN0b3JhZ2UgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgdmFyIHN0b3JhZ2UgPSB7fTtcclxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyhzdG9yYWdlLCB7XHJcbiAgICAgICAgICAgIHNldEl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghTW9ja1N0b3JhZ2VIZWxwZXIuaXNTZWN1cmVkRmllbGQoa2V5KSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1trZXldID0gdmFsdWU7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRJdGVtOiB7XHJcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhTW9ja1N0b3JhZ2VIZWxwZXIuaXNTZWN1cmVkRmllbGQoa2V5KSA/IHRoaXNba2V5XSB8fCBudWxsIDogbnVsbDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHJlbW92ZUl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFNb2NrU3RvcmFnZUhlbHBlci5pc1NlY3VyZWRGaWVsZChrZXkpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpc1trZXldO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbGVuZ3RoOiB7XHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcykubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHN0b3JhZ2U7XHJcbiAgICB9O1xyXG4gICAgcmV0dXJuIE1vY2tTdG9yYWdlSGVscGVyO1xyXG59KCkpO1xyXG5leHBvcnQgeyBNb2NrU3RvcmFnZUhlbHBlciB9O1xyXG5Nb2NrU3RvcmFnZUhlbHBlci5zZWN1cmVkRmllbGRzID0gWydzZXRJdGVtJywgJ2dldEl0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QUdFX0NPTkZJRycpO1xyXG52YXIgTmcyV2Vic3RvcmFnZSA9IChmdW5jdGlvbiAoKSB7XHJcbiAgICBmdW5jdGlvbiBOZzJXZWJzdG9yYWdlKG5nWm9uZSwgY29uZmlnKSB7XHJcbiAgICAgICAgdGhpcy5uZ1pvbmUgPSBuZ1pvbmU7XHJcbiAgICAgICAgaWYgKGNvbmZpZykge1xyXG4gICAgICAgICAgICBLZXlTdG9yYWdlSGVscGVyLnNldFN0b3JhZ2VLZXlQcmVmaXgoY29uZmlnLnByZWZpeCk7XHJcbiAgICAgICAgICAgIEtleVN0b3JhZ2VIZWxwZXIuc2V0U3RvcmFnZUtleVNlcGFyYXRvcihjb25maWcuc2VwYXJhdG9yKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5pbml0U3RvcmFnZUxpc3RlbmVyKCk7XHJcbiAgICB9XHJcbiAgICBOZzJXZWJzdG9yYWdlLmZvclJvb3QgPSBmdW5jdGlvbiAoY29uZmlnKSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgbmdNb2R1bGU6IE5nMldlYnN0b3JhZ2UsXHJcbiAgICAgICAgICAgIHByb3ZpZGVyczogW1xyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHByb3ZpZGU6IFdFQlNUT1JBR0VfQ09ORklHLFxyXG4gICAgICAgICAgICAgICAgICAgIHVzZVZhbHVlOiBjb25maWdcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogV2Vic3RvcmFnZUNvbmZpZyxcclxuICAgICAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBwcm92aWRlQ29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgIGRlcHM6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgV0VCU1RPUkFHRV9DT05GSUdcclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIF1cclxuICAgICAgICB9O1xyXG4gICAgfTtcclxuICAgIE5nMldlYnN0b3JhZ2UucHJvdG90eXBlLmluaXRTdG9yYWdlTGlzdGVuZXIgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcclxuICAgICAgICBpZiAod2luZG93KSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdzdG9yYWdlJywgZnVuY3Rpb24gKGV2ZW50KSB7IHJldHVybiBfdGhpcy5uZ1pvbmUucnVuKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBzdG9yYWdlID0gd2luZG93LnNlc3Npb25TdG9yYWdlID09PSBldmVudC5zdG9yYWdlQXJlYSA/IFNUT1JBR0Uuc2Vzc2lvbiA6IFNUT1JBR0UubG9jYWw7XHJcbiAgICAgICAgICAgICAgICBXZWJTdG9yYWdlSGVscGVyLnJlZnJlc2goc3RvcmFnZSwgZXZlbnQua2V5KTtcclxuICAgICAgICAgICAgfSk7IH0pO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcbiAgICByZXR1cm4gTmcyV2Vic3RvcmFnZTtcclxufSgpKTtcclxuZXhwb3J0IHsgTmcyV2Vic3RvcmFnZSB9O1xyXG5OZzJXZWJzdG9yYWdlLmRlY29yYXRvcnMgPSBbXHJcbiAgICB7IHR5cGU6IE5nTW9kdWxlLCBhcmdzOiBbe1xyXG4gICAgICAgICAgICAgICAgZGVjbGFyYXRpb25zOiBbXSxcclxuICAgICAgICAgICAgICAgIHByb3ZpZGVyczogW1Nlc3Npb25TdG9yYWdlU2VydmljZSwgTG9jYWxTdG9yYWdlU2VydmljZV0sXHJcbiAgICAgICAgICAgICAgICBpbXBvcnRzOiBbXVxyXG4gICAgICAgICAgICB9LF0gfSxcclxuXTtcclxuLyoqIEBub2NvbGxhcHNlICovXHJcbk5nMldlYnN0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zW3NUeXBlXTtcclxuICAgIH07XHJcbiAgICBNb2NrU3RvcmFnZUhlbHBlci5nZW5lcmF0ZVN0b3JhZ2UgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgdmFyIHN0b3JhZ2UgPSB7fTtcclxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyhzdG9yYWdlLCB7XHJcbiAgICAgICAgICAgIHNldEl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghTW9ja1N0b3JhZ2VIZWxwZXIuaXNTZWN1cmVkRmllbGQoa2V5KSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1trZXldID0gdmFsdWU7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRJdGVtOiB7XHJcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhTW9ja1N0b3JhZ2VIZWxwZXIuaXNTZWN1cmVkRmllbGQoa2V5KSA/IHRoaXNba2V5XSB8fCBudWxsIDogbnVsbDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHJlbW92ZUl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFNb2NrU3RvcmFnZUhlbHBlci5pc1NlY3VyZWRGaWVsZChrZXkpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpc1trZXldO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbGVuZ3RoOiB7XHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcykubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHN0b3JhZ2U7XHJcbiAgICB9O1xyXG4gICAgcmV0dXJuIE1vY2tTdG9yYWdlSGVscGVyO1xyXG59KCkpO1xyXG5leHBvcnQgeyBNb2NrU3RvcmFnZUhlbHBlciB9O1xyXG5Nb2NrU3RvcmFnZUhlbHBlci5zZWN1cmVkRmllbGRzID0gWydzZXRJdGVtJywgJ2dldEl0ZW0nLCAncmVtb3ZlSXRlbScsICdsZW5ndGgnXTtcclxuTW9ja1N0b3JhZ2VIZWxwZXIubW9ja1N0b3JhZ2VzID0ge307XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW1vY2tTdG9yYWdlLmpzLm1hcCIsImltcG9ydCB7IFNUT1JBR0UgfSBmcm9tICcuLi9lbnV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xuICAgICAgICBpZiAoY29uZmlnKSB7XHJcbiAgICAgICAgICAgIEtleVN0b3JhZ2VIZWxwZXIuc2V0U3RvcmFnZUtleVByZWZpeChjb25maWcucHJlZml4KTtcclxuICAgICAgICAgICAgS2V5U3RvcmFnZUhlbHBlci5zZXRTdG9yYWdlS2V5U2VwYXJhdG9yKGNvbmZpZy5zZXBhcmF0b3IpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmluaXRTdG9yYWdlTGlzdGVuZXIoKTtcclxuICAgIH1cclxuICAgIE5nMldlYnN0b3JhZ2UuZm9yUm9vdCA9IGZ1bmN0aW9uIChjb25maWcpIHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBuZ01vZHVsZTogTmcyV2Vic3RvcmFnZSxcclxuICAgICAgICAgICAgcHJvdmlkZXJzOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogV0VCU1RPUkFHRV9DT05GSUcsXHJcbiAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBXZWJzdG9yYWdlQ29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IHByb3ZpZGVDb25maWcsXHJcbiAgICAgICAgICAgICAgICAgICAgZGVwczogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBXRUJTVE9SQUdFX0NPTkZJR1xyXG4gICAgICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgXVxyXG4gICAgICAgIH07XHJcbiAgICB9O1xyXG4gICAgTmcyV2Vic3RvcmFnZS5wcm90b3R5cGUuaW5pdFN0b3JhZ2VMaXN0ZW5lciA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICB2YXIgX3Roa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UFDO0NBQ3RELEFBQ0QsOzs7Ozs7Ozs7Ozs7Oyw7Oyw7OyJ9 |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(e.ng2Webstorage=e.ng2Webstorage||{},e.ng.core)}(this,function(e,t){"use strict";function r(e){return 0===e.indexOf(v+y)}function o(e,t){return function(t,r){n(e,c.local,t,r)}}function n(e,t,r,o){var n=e||o;Object.defineProperty(r,o,{get:function(){var e=d.genKey(n);return K.retrieve(t,e)},set:function(e){var r=d.genKey(n);this[r]=e,K.store(t,r,e)}})}function i(e){return function(t,r){n(e,c.local,t,r)}}function s(e){return function(t,r){n(e,c.session,t,r)}}function a(e){return new P(e)}function u(e){var t=void 0===e?{prefix:l,separator:g}:e,r=t.prefix,o=t.separator;console.warn("[ng2-webstorage:deprecation] The configure method is deprecated since the v1.5.0, consider to use forRoot instead"),d.setStorageKeyPrefix(r),d.setStorageKeySeparator(o)}var c;!function(e){e[e.local=0]="local",e[e.session=1]="session"}(c||(c={}));var f,l="ng2-webstorage",g="|",p=(f={},f[c.local]="local",f[c.session]="session",f),v=l,y=g,d=function(){function e(){}return e.isManagedKey=function(e){return 0===e.indexOf(v+y)},e.retrieveKeysFromStorage=function(e){return Object.keys(e).filter(r)},e.genKey=function(e){if("string"!=typeof e)throw Error("attempt to generate a storage key with a non string value");return""+v+y+e.toString().toLowerCase()},e.setStorageKeyPrefix=function(e){void 0===e&&(e=l),v=e},e.setStorageKeySeparator=function(e){void 0===e&&(e=g),y=e},e}(),h=function(){function e(){}return e.observe=function(e,r){var o=this.genObserverKey(e,r);return o in this.observers?this.observers[o]:this.observers[o]=new t.EventEmitter},e.emit=function(e,t,r){var o=this.genObserverKey(e,t);o in this.observers&&this.observers[o].emit(r)},e.genObserverKey=function(e,t){return e+"|"+t},e}();h.observers={};var S=function(){function e(){}return e.isSecuredField=function(t){return!!~e.securedFields.indexOf(t)},e.getStorage=function(t){return this.mockStorages[t]||(this.mockStorages[t]=e.generateStorage()),this.mockStorages[t]},e.generateStorage=function(){var t={};return Object.defineProperties(t,{setItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t,r){e.isSecuredField(t)||(this[t]=r)}},getItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){return e.isSecuredField(t)?null:this[t]||null}},removeItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){e.isSecuredField(t)||delete this[t]}},length:{enumerable:!1,configurable:!1,get:function(){return Object.keys(this).length}}}),t},e}();S.securedFields=["setItem","getItem","removeItem","length"],S.mockStorages={};var b,m,w=(b={},b[c.local]={},b[c.session]={},b),O=(m={},m[c.local]=null,m[c.session]=null,m),K=function(){function e(){}return e.store=function(e,t,r){this.getStorage(e).setItem(t,JSON.stringify(r)),w[e][t]=r,h.emit(e,t,r)},e.retrieve=function(t,r){return w[t][r]?w[t][r]:w[t][r]=e.retrieveFromStorage(t,r)},e.retrieveFromStorage=function(e,t){var r=null;try{r=JSON.parse(this.getStorage(e).getItem(t))}catch(e){console.warn("invalid value for "+t)}return r},e.refresh=function(t,r){if(d.isManagedKey(r)){var o=e.retrieveFromStorage(t,r);null===o?(delete w[t][r],h.emit(t,r,null)):o!==w[t][r]&&(w[t][r]=o,h.emit(t,r,o))}},e.clearAll=function(e){var t=this.getStorage(e);d.retrieveKeysFromStorage(t).forEach(function(r){t.removeItem(r),delete w[e][r],h.emit(e,r,null)})},e.clear=function(e,t){this.getStorage(e).removeItem(t),delete w[e][t],h.emit(e,t,null)},e.getStorage=function(e){return this.isStorageAvailable(e)?this.getWStorage(e):void S.getStorage(e)},e.getWStorage=function(e){var t;switch(e){case c.local:t=localStorage;break;case c.session:t=sessionStorage;break;default:throw Error("invalid storage type")}return t},e.isStorageAvailable=function(e){if("boolean"==typeof O[e])return O[e];var t=!0,r=this.getWStorage(e);if("object"==typeof r)try{r.setItem("test-storage","foobar"),r.removeItem("test-storage")}catch(e){t=!1}else t=!1;return t||console.warn(p[e]+" storage unavailable, Ng2Webstorage will use a fallback strategy instead"),O[e]=t},e}(),_=function(){function e(e){void 0===e&&(e=null),this.sType=e,this.sType=e}return e.prototype.store=function(e,t){var r=d.genKey(e);K.store(this.sType,r,t)},e.prototype.retrieve=function(e){var t=d.genKey(e);return K.retrieve(this.sType,t)},e.prototype.clear=function(e){e?K.clear(this.sType,d.genKey(e)):K.clearAll(this.sType)},e.prototype.observe=function(e){var t=d.genKey(e);return h.observe(this.sType,t)},e}(),I=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return e.call(this,c.local)||this}return I(t,e),t}(_);x.decorators=[{type:t.Injectable}],x.ctorParameters=function(){return[]};var j=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),F=function(e){function t(){return e.call(this,c.session)||this}return j(t,e),t}(_);F.decorators=[{type:t.Injectable}],F.ctorParameters=function(){return[]};var P=function(){function e(e){this.prefix=l,this.separator=g,e&&void 0!==e.prefix&&(this.prefix=e.prefix),e&&void 0!==e.separator&&(this.separator=e.separator)}return e}(),W=new t.OpaqueToken("WEBSTORAGE_CONFIG"),k=function(){function e(e,t){this.ngZone=e,t&&(d.setStorageKeyPrefix(t.prefix),d.setStorageKeySeparator(t.separator)),this.initStorageListener()}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:W,useValue:t},{provide:P,useFactory:a,deps:[W]}]}},e.prototype.initStorageListener=function(){var e=this;window&&window.addEventListener("storage",function(t){return e.ngZone.run(function(){var e=window.sessionStorage===t.storageArea?c.session:c.local;K.refresh(e,t.key)})})},e}();k.decorators=[{type:t.NgModule,args:[{declarations:[],providers:[F,x],imports:[]}]}],k.ctorParameters=function(){return[{type:t.NgZone},{type:P,decorators:[{type:t.Optional},{type:t.Inject,args:[P]}]}]},e.WEBSTORAGE_CONFIG=W,e.Ng2Webstorage=k,e.provideConfig=a,e.configure=u,e.WebstorageConfig=P,e.LocalStorage=i,e.SessionStorage=s,e.WebStorage=o,e.WebStorageDecorator=n,e.WebStorageService=_,e.LocalStorageService=x,e.SessionStorageService=F,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(e.ng2Webstorage=e.ng2Webstorage||{},e.ng.core)}(this,function(e,t){"use strict";function r(e){return 0===e.indexOf(v+y)}function o(e,t){return function(t,r){n(e,c.local,t,r)}}function n(e,t,r,o){var n=e||o;Object.defineProperty(r,o,{get:function(){var e=d.genKey(n);return K.retrieve(t,e)},set:function(e){var r=d.genKey(n);this[r]=e,K.store(t,r,e)}})}function i(e){return function(t,r){n(e,c.local,t,r)}}function s(e){return function(t,r){n(e,c.session,t,r)}}function a(e){return new P(e)}function u(e){var t=void 0===e?{prefix:l,separator:g}:e,r=t.prefix,o=t.separator;console.warn("[ng2-webstorage:deprecation] The configure method is deprecated since the v1.5.0, consider to use forRoot instead"),d.setStorageKeyPrefix(r),d.setStorageKeySeparator(o)}var c;!function(e){e[e.local=0]="local",e[e.session=1]="session"}(c||(c={}));var f,l="ng2-webstorage",g="|",p=(f={},f[c.local]="local",f[c.session]="session",f),v=l,y=g,d=function(){function e(){}return e.isManagedKey=function(e){return 0===e.indexOf(v+y)},e.retrieveKeysFromStorage=function(e){return Object.keys(e).filter(r)},e.genKey=function(e){if("string"!=typeof e)throw Error("attempt to generate a storage key with a non string value");return""+v+y+e.toString().toLowerCase()},e.setStorageKeyPrefix=function(e){void 0===e&&(e=l),v=e},e.setStorageKeySeparator=function(e){void 0===e&&(e=g),y=e},e}(),h=function(){function e(){}return e.observe=function(e,r){var o=this.genObserverKey(e,r);return o in this.observers?this.observers[o]:this.observers[o]=new t.EventEmitter},e.emit=function(e,t,r){var o=this.genObserverKey(e,t);o in this.observers&&this.observers[o].emit(r)},e.genObserverKey=function(e,t){return e+"|"+t},e}();h.observers={};var S=function(){function e(){}return e.isSecuredField=function(t){return!!~e.securedFields.indexOf(t)},e.getStorage=function(t){return this.mockStorages[t]||(this.mockStorages[t]=e.generateStorage()),this.mockStorages[t]},e.generateStorage=function(){var t={};return Object.defineProperties(t,{setItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t,r){e.isSecuredField(t)||(this[t]=r)}},getItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){return e.isSecuredField(t)?null:this[t]||null}},removeItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){e.isSecuredField(t)||delete this[t]}},length:{enumerable:!1,configurable:!1,get:function(){return Object.keys(this).length}}}),t},e}();S.securedFields=["setItem","getItem","removeItem","length"],S.mockStorages={};var b,m,w=(b={},b[c.local]={},b[c.session]={},b),O=(m={},m[c.local]=null,m[c.session]=null,m),K=function(){function e(){}return e.store=function(e,t,r){this.getStorage(e).setItem(t,JSON.stringify(r)),w[e][t]=r,h.emit(e,t,r)},e.retrieve=function(t,r){return w[t][r]?w[t][r]:w[t][r]=e.retrieveFromStorage(t,r)},e.retrieveFromStorage=function(e,t){var r=null;try{r=JSON.parse(this.getStorage(e).getItem(t))}catch(e){console.warn("invalid value for "+t)}return r},e.refresh=function(t,r){if(d.isManagedKey(r)){var o=e.retrieveFromStorage(t,r);null===o?(delete w[t][r],h.emit(t,r,null)):o!==w[t][r]&&(w[t][r]=o,h.emit(t,r,o))}},e.clearAll=function(e){var t=this.getStorage(e);d.retrieveKeysFromStorage(t).forEach(function(r){t.removeItem(r),delete w[e][r],h.emit(e,r,null)})},e.clear=function(e,t){this.getStorage(e).removeItem(t),delete w[e][t],h.emit(e,t,null)},e.getStorage=function(e){return this.isStorageAvailable(e)?this.getWStorage(e):void S.getStorage(e)},e.getWStorage=function(e){var t;switch(e){case c.local:t=localStorage;break;case c.session:t=sessionStorage;break;default:throw Error("invalid storage type")}return t},e.isStorageAvailable=function(e){if("boolean"==typeof O[e])return O[e];var t,r=!0;try{t=this.getWStorage(e),"object"==typeof t?(t.setItem("test-storage","foobar"),t.removeItem("test-storage")):r=!1}catch(e){r=!1}return r||console.warn(p[e]+" storage unavailable, Ng2Webstorage will use a fallback strategy instead"),O[e]=r},e}(),_=function(){function e(e){void 0===e&&(e=null),this.sType=e,this.sType=e}return e.prototype.store=function(e,t){var r=d.genKey(e);K.store(this.sType,r,t)},e.prototype.retrieve=function(e){var t=d.genKey(e);return K.retrieve(this.sType,t)},e.prototype.clear=function(e){e?K.clear(this.sType,d.genKey(e)):K.clearAll(this.sType)},e.prototype.observe=function(e){var t=d.genKey(e);return h.observe(this.sType,t)},e}(),I=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return e.call(this,c.local)||this}return I(t,e),t}(_);x.decorators=[{type:t.Injectable}],x.ctorParameters=function(){return[]};var j=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),F=function(e){function t(){return e.call(this,c.session)||this}return j(t,e),t}(_);F.decorators=[{type:t.Injectable}],F.ctorParameters=function(){return[]};var P=function(){function e(e){this.prefix=l,this.separator=g,e&&void 0!==e.prefix&&(this.prefix=e.prefix),e&&void 0!==e.separator&&(this.separator=e.separator)}return e}(),W=new t.OpaqueToken("WEBSTORAGE_CONFIG"),k=function(){function e(e,t){this.ngZone=e,t&&(d.setStorageKeyPrefix(t.prefix),d.setStorageKeySeparator(t.separator)),this.initStorageListener()}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:W,useValue:t},{provide:P,useFactory:a,deps:[W]}]}},e.prototype.initStorageListener=function(){var e=this;window&&window.addEventListener("storage",function(t){return e.ngZone.run(function(){var e=window.sessionStorage===t.storageArea?c.session:c.local;K.refresh(e,t.key)})})},e}();k.decorators=[{type:t.NgModule,args:[{declarations:[],providers:[F,x],imports:[]}]}],k.ctorParameters=function(){return[{type:t.NgZone},{type:P,decorators:[{type:t.Optional},{type:t.Inject,args:[P]}]}]},e.WEBSTORAGE_CONFIG=W,e.Ng2Webstorage=k,e.provideConfig=a,e.configure=u,e.WebstorageConfig=P,e.LocalStorage=i,e.SessionStorage=s,e.WebStorage=o,e.WebStorageDecorator=n,e.WebStorageService=_,e.LocalStorageService=x,e.SessionStorageService=F,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -81,14 +81,15 @@ import { STORAGE } from '../enums/storage'; | ||
return STORAGEAVAILABILITY[sType]; | ||
var isAvailable = true, storage = this.getWStorage(sType); | ||
if (typeof storage === 'object') { | ||
try { | ||
var isAvailable = true, storage; | ||
try { | ||
storage = this.getWStorage(sType); | ||
if (typeof storage === 'object') { | ||
storage.setItem('test-storage', 'foobar'); | ||
storage.removeItem('test-storage'); | ||
} | ||
catch (e) { | ||
else | ||
isAvailable = false; | ||
} | ||
} | ||
else | ||
catch (e) { | ||
isAvailable = false; | ||
} | ||
if (!isAvailable) | ||
@@ -95,0 +96,0 @@ console.warn(STORAGE_NAMES[sType] + " storage unavailable, Ng2Webstorage will use a fallback strategy instead"); |
{ | ||
"name": "ng2-webstorage", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "angular2 webstorage manager", | ||
@@ -5,0 +5,0 @@ "main": "bundles/core.umd.js", |
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
258883
1131