Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "vue-ls", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "vue.js localStorage plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/vue-ls.js", |
@@ -1,7 +0,1 @@ | ||
/*! | ||
* vue-ls.js 1.0.8 | ||
* (c) 2017 Igor Ognichenko <igor.ognichenko@gmail.com> | ||
* Released under the MIT License. | ||
*/ | ||
(function (global, factory) { | ||
@@ -13,2 +7,4 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -77,3 +73,3 @@ | ||
value: function install(Vue, options) { | ||
this.options = Object.assign({ | ||
this.options = _extends({ | ||
namespace: '' | ||
@@ -80,0 +76,0 @@ }, options || {}); |
@@ -1,1 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e["vue-ls"]=t()}(this,function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){function t(t){var n=JSON.parse(e.newValue),r=JSON.parse(e.oldValue),i="object"===("undefined"==typeof n?"undefined":o(n))?n.value:r,a=r&&"object"===("undefined"==typeof r?"undefined":o(r))?r.value:r;t(i,a,e.url||e.uri)}e||(e=window.event);var n=r[e.key];n&&n.forEach(t)}var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={};try{var i=window.localStorage,a="__storage_test__";i.setItem(a,a),i.removeItem(a)}catch(e){throw new Error("Local storage not supported by this browser")}var u=function(){function o(){e(this,o),this.storage=window.localStorage,window.addEventListener?window.addEventListener("storage",t,!1):window.attachEvent?window.attachEvent("onstorage",t):window.onstorage=t,Object.defineProperty(this,"length",{get:function(){return this.storage.length}})}return n(o,[{key:"install",value:function(e,t){this.options=Object.assign({namespace:""},t||{});var n=this;e.localStorage=n,Object.defineProperty(e.prototype,"$localStorage",{get:function(){return n}})}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.storage.setItem(this.options.namespace+e,JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+n:null}))}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.storage.getItem(this.options.namespace+e);if(null!==n){var o=JSON.parse(n);if(null===o.expire)return o.value;if(o.expire>=(new Date).getTime())return o.value;this.remove(e)}return t}},{key:"key",value:function(e){return this.storage.key(e)}},{key:"remove",value:function(e){return this.storage.removeItem(this.options.namespace+e)}},{key:"clear",value:function(){if(0!==this.length)for(var e=0;e<this.length;e++){var t=this.storage.key(e),n=new RegExp("^"+this.options.namespace+".+","i");n.test(t)!==!1&&this.storage.removeItem(t)}}},{key:"on",value:function(e,t){r[e]?r[e].push(t):r[e]=[t]}},{key:"off",value:function(e,t){var n=r[e];n.length>1?n.splice(n.indexOf(t),1):r[e]=[]}}]),o}();return"undefined"!=typeof window&&"undefined"!=typeof window.Vue&&window.Vue.use(new u),u}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e["vue-ls"]=t()}(this,function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){function t(t){var n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),i="object"===("undefined"==typeof n?"undefined":r(n))?n.value:o,a=o&&"object"===("undefined"==typeof o?"undefined":r(o))?o.value:o;t(i,a,e.url||e.uri)}e||(e=window.event);var n=i[e.key];n&&n.forEach(t)}var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i={};try{var a=window.localStorage,u="__storage_test__";a.setItem(u,u),a.removeItem(u)}catch(e){throw new Error("Local storage not supported by this browser")}var s=function(){function r(){e(this,r),this.storage=window.localStorage,window.addEventListener?window.addEventListener("storage",t,!1):window.attachEvent?window.attachEvent("onstorage",t):window.onstorage=t,Object.defineProperty(this,"length",{get:function(){return this.storage.length}})}return o(r,[{key:"install",value:function(e,t){this.options=n({namespace:""},t||{});var o=this;e.localStorage=o,Object.defineProperty(e.prototype,"$localStorage",{get:function(){return o}})}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.storage.setItem(this.options.namespace+e,JSON.stringify({value:t,expire:null!==n?(new Date).getTime()+n:null}))}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.storage.getItem(this.options.namespace+e);if(null!==n){var o=JSON.parse(n);if(null===o.expire)return o.value;if(o.expire>=(new Date).getTime())return o.value;this.remove(e)}return t}},{key:"key",value:function(e){return this.storage.key(e)}},{key:"remove",value:function(e){return this.storage.removeItem(this.options.namespace+e)}},{key:"clear",value:function(){if(0!==this.length)for(var e=0;e<this.length;e++){var t=this.storage.key(e),n=new RegExp("^"+this.options.namespace+".+","i");n.test(t)!==!1&&this.storage.removeItem(t)}}},{key:"on",value:function(e,t){i[e]?i[e].push(t):i[e]=[t]}},{key:"off",value:function(e,t){var n=i[e];n.length>1?n.splice(n.indexOf(t),1):i[e]=[]}}]),r}();return"undefined"!=typeof window&&"undefined"!=typeof window.Vue&&window.Vue.use(new s),s}); | ||
//# sourceMappingURL=vue-ls.min.js.map |
{ | ||
"name": "vue-ls", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "vue.js localStorage plugin", | ||
"main": "dist/vue-ls.js", | ||
"scripts": { | ||
"build": "node build" | ||
"build": "node_modules/.bin/gulp" | ||
}, | ||
@@ -33,9 +33,10 @@ "dependencies": {}, | ||
"devDependencies": { | ||
"babel-cli": "^6.22.2", | ||
"babel-polyfill": "^6.22.0", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-preset-es2015": "^6.22.0", | ||
"babel-preset-es2015-rollup": "^3.0.0", | ||
"rollup": "^0.41.4", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"rollup-plugin-uglify": "^1.0.1" | ||
"gulp": "github:gulpjs/gulp#4.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-rollup": "^2.11.0", | ||
"gulp-sourcemaps": "^2.4.1", | ||
"gulp-uglify": "^2.0.1", | ||
"rollup-plugin-babel": "^2.7.1" | ||
}, | ||
@@ -42,0 +43,0 @@ "semistandard": { |
@@ -26,2 +26,6 @@ # vue-ls | ||
``` | ||
or | ||
``` bash | ||
bower install vue-ls --save | ||
``` | ||
@@ -28,0 +32,0 @@ ### Development Setup |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
80408
14
120
0
8
334