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

vue-ls

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-ls - npm Package Compare versions

Comparing version 2.1.7 to 2.2.2

dist/vue-ls.esm.js

128

dist/vue-ls.js

@@ -10,5 +10,20 @@ (function (global, factory) {

var memoryStorage = {
/**
* Get item
*
* @param {string} name
* @returns {*}
*/
getItem: function getItem(name) {
return name in ls$1 ? ls$1[name] : null;
},
/**
* Set item
*
* @param {string} name
* @param {*} value
* @returns {boolean}
*/
setItem: function setItem(name, value) {

@@ -19,2 +34,10 @@ ls$1[name] = value;

},
/**
* Remove item
*
* @param {string} name
* @returns {boolean}
*/
removeItem: function removeItem(name) {

@@ -29,2 +52,9 @@ var found = name in ls$1;

},
/**
* Clear storage
*
* @returns {boolean}
*/
clear: function clear() {

@@ -35,2 +65,10 @@ ls$1 = {};

},
/**
* Get item by key
*
* @param {number} index
* @returns {*}
*/
key: function key(index) {

@@ -44,2 +82,7 @@ var keys = Object.keys(ls$1);

Object.defineProperty(memoryStorage, 'length', {
/**
* Define length property
*
* @return {number}
*/
get: function get() {

@@ -96,2 +139,7 @@ return Object.keys(ls$1).length;

/**
* Event callback
*
* @param {Object} e
*/
function change(e) {

@@ -117,3 +165,11 @@ if (!e) {

/**
* Storage Bridge
*/
var Storage = function () {
/**
* @param {Object} storage
* @param {Object} options
*/
function Storage(storage, options) {

@@ -129,2 +185,7 @@ classCallCheck(this, Storage);

Object.defineProperty(this, 'length', {
/**
* Define length property
*
* @return {number}
*/
get: function get$$1() {

@@ -148,2 +209,11 @@ return this.storage.length;

/**
* Set item
*
* @param {string} name
* @param {*} value
* @param {number} expire - seconds
*/
createClass(Storage, [{

@@ -156,2 +226,11 @@ key: 'set',

}
/**
* Get item
*
* @param {string} name
* @param {*} def - default value
* @returns {*}
*/
}, {

@@ -180,2 +259,10 @@ key: 'get',

}
/**
* Get item by key
*
* @param {number} index
* @return {*}
*/
}, {

@@ -186,2 +273,10 @@ key: 'key',

}
/**
* Remove item
*
* @param {string} name
* @return {boolean}
*/
}, {

@@ -192,2 +287,7 @@ key: 'remove',

}
/**
* Clear storage
*/
}, {

@@ -217,2 +317,10 @@ key: 'clear',

}
/**
* Add storage change event
*
* @param {string} name
* @param {Function} callback
*/
}, {

@@ -227,2 +335,10 @@ key: 'on',

}
/**
* Remove storage change event
*
* @param {string} name
* @param {Function} callback
*/
}, {

@@ -247,2 +363,9 @@ key: 'off',

var VueLocalStorage = {
/**
* Install plugin
*
* @param {Object} Vue
* @param {Object} options
* @returns {Storage}
*/
install: function install(Vue, options) {

@@ -255,2 +378,7 @@ storageObject.options = _extends(storageObject.options, {

Object.defineProperty(Vue.prototype, '$ls', {
/**
* Define $ls property
*
* @return {Storage}
*/
get: function get$$1() {

@@ -257,0 +385,0 @@ return storageObject;

16

package.json
{
"name": "vue-ls",
"version": "2.1.7",
"version": "2.2.2",
"description": "Vue plugin for work with LocalStorage from Vue context",
"main": "dist/vue-ls.js",
"jsnext:main": "src/index.js",
"module": "dist/vue-ls.esm.js",
"unpkg": "dist/vue-ls.min.js",
"files": [
"src",
"dist/*.js"
],
"scripts": {
"build": "node_modules/.bin/gulp",
"build": "node_modules/.bin/gulp js && node_modules/.bin/rollup src/index.js --format es --output dist/vue-ls.esm.js",
"test": "node_modules/.bin/nyc node_modules/.bin/ava --tap --esnext",

@@ -21,3 +27,6 @@ "test:browserstack": "RUN_ON_BSTACK=true BSTACK_LOCAL=true node_modules/.bin/gulp test --env bstack_chrome_50,bstack_chrome_57,bstack_ie_9,bstack_ie_11,bstack_edge_13,bstack_edge_14,bstack_firefox_40,bstack_firefox_52,bstack_safari_8,bstack_safari_10",

"report": "npm test && node_modules/.bin/nyc report --reporter=html",
"coveralls": "./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls"
"coveralls": "./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls",
"patch": "npm version patch --no-git-tag-version && git add package.json && git commit -m 'update version' && git push origin master && bower version patch && git push origin master --follow-tags && npm publish",
"minor": "npm version minor --no-git-tag-version && git add package.json && git commit -m 'update version' && git push origin master && bower version minor && git push origin master --follow-tags && npm publish",
"major": "npm version major --no-git-tag-version && git add package.json && git commit -m 'update version' && git push origin master && bower version major && git push origin master --follow-tags && npm publish"
},

@@ -72,2 +81,3 @@ "dependencies": {},

"phantomjs": "^2.1.7",
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",

@@ -74,0 +84,0 @@ "selenium-server": "^3.3.1",

.babelrc
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