Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

localstorage-fifo

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

1

lib/fifo.js

@@ -276,2 +276,3 @@ var classCallCheck = function (instance, Constructor) {

var keys = this.data.keys;
keys.forEach(function (suspect, i) {

@@ -278,0 +279,0 @@ if (suspect === victim) {

52

package.json
{
"name": "localstorage-fifo",
"version": "2.0.0",
"version": "2.0.1",
"description": "JavaScript library for interacting with localStorage safely.",

@@ -26,31 +26,31 @@ "author": "Matthew Callis <matthew.callis@gmail.com>",

"devDependencies": {
"ava": "^0.18.2",
"babel-cli": "^6.23.0",
"babel-plugin-espower": "^2.3.2",
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-plugin-espower": "^2.4.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-istanbul": "^4.0.0",
"babel-preset-es2015": "^6.22.0",
"babel-plugin-istanbul": "^4.1.5",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-rollup": "^3.0.0",
"babel-preset-es2016": "^6.22.0",
"babel-register": "^6.23.0",
"browser-env": "^2.0.21",
"codeclimate-test-reporter": "^0.4.1",
"coveralls": "^2.11.16",
"eslint": "^3.16.0",
"eslint-config-airbnb": "^14.1.0",
"eslint-loader": "^1.6.1",
"eslint-plugin-ava": "^4.2.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"babel-preset-es2016": "^6.24.1",
"babel-register": "^6.26.0",
"browser-env": "^3.2.5",
"codeclimate-test-reporter": "^0.5.0",
"coveralls": "^3.0.0",
"eslint": "^4.18.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-ava": "^4.5.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-no-inferred-method-name": "^1.0.2",
"eslint-plugin-react": "^6.10.0",
"eslint-plugin-xss": "^0.1.8",
"npm-bump": "^0.0.20",
"nyc": "^10.1.2",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-xss": "^0.1.9",
"npm-bump": "^0.0.23",
"nyc": "^11.4.1",
"precommit-hook-eslint": "^3.0.0",
"rollup": "^0.41.4",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-eslint": "^3.0.0",
"rollup-plugin-json": "^2.1.0",
"uglify-js": "^2.7.5"
"rollup": "^0.56.2",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-eslint": "^4.0.0",
"rollup-plugin-json": "^2.3.0",
"uglify-js": "^3.3.11"
},

@@ -57,0 +57,0 @@ "preferGlobal": false,

@@ -6,2 +6,5 @@ # [Fifo](https://github.com/MatthewCallis/fifo)

[![Coverage Status](https://coveralls.io/repos/github/MatthewCallis/fifo/badge.svg?branch=master)](https://coveralls.io/github/MatthewCallis/fifo?branch=master)
[![devDependency Status](https://david-dm.org/MatthewCallis/fifo/dev-status.svg?style=flat)](https://david-dm.org/MatthewCallis/fifo#info=devDependencies)
[![npm version](https://img.shields.io/npm/v/localstorage-fifo.svg?style=flat-square)](https://www.npmjs.com/package/localstorage-fifo)
[![npm downloads](https://img.shields.io/npm/dm/localstorage-fifo.svg?style=flat-square)](https://www.npmjs.com/package/localstorage-fifo)

@@ -22,3 +25,3 @@ **First In First Out accounting for JavaScript `localStorage`.**

// create a collection stored on `tasks` key in localStorage
const collection = Fifo({ namespace: 'tasks' });
const collection = new Fifo({ namespace: 'tasks' });

@@ -25,0 +28,0 @@ // set an item

@@ -7,3 +7,3 @@ /* eslint no-console: 0 */

rollup({
entry: 'src/fifo.js',
input: 'src/fifo.js',
plugins: [

@@ -20,15 +20,12 @@ json({

],
})
.then(bundle => (
}).then(bundle => (
bundle.write({
format: 'es',
moduleName: 'Fifo',
dest: 'lib/fifo.js',
name: 'Fifo',
file: 'lib/fifo.js',
})
))
.then(() => {
)).then(() => {
console.log('💝 Fifo Bundle Created!');
})
.catch((e) => {
}).catch((e) => {
console.error('💀 Rollup Error:', e);
});

@@ -174,3 +174,3 @@ import LocalStorage from './localStorage';

const keys = this.data.keys;
const { keys } = this.data;
keys.forEach((suspect, i) => {

@@ -177,0 +177,0 @@ if (suspect === victim) {

@@ -55,3 +55,3 @@ /** @test {Fifo} */

limitReached = true;
removedItem = items[0];
[removedItem] = items;
};

@@ -73,2 +73,3 @@

if (collection.noLS) {
t.is(true, true);
return;

@@ -85,7 +86,7 @@ }

const moreFifoOnLimit = (items) => {
removedItemForFifo = items[0];
[removedItemForFifo] = items;
};
const fixedKeyOnLimit = (items) => {
removedItemForFixedKey = items[0];
[removedItemForFixedKey] = items;
collection.set(key, n1m, moreFifoOnLimit);

@@ -96,3 +97,3 @@ };

limitReached = true;
removedItem = items[0];
[removedItem] = items;
collection.set('fixed-key', n1m, fixedKeyOnLimit);

@@ -99,0 +100,0 @@ };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc