New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

itemsholdr

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itemsholdr - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

4

lib/ItemsHoldr.d.ts

@@ -548,2 +548,6 @@ declare namespace ItemsHoldr {

/**
* Toggles this.autoSave.
*/
toggleAutoSave(): void;
/**
* Ensures a key exists in values. If it doesn't, and new values are

@@ -550,0 +554,0 @@ * allowed, it creates it; otherwise, it throws an Error.

10

lib/ItemsHoldr.js

@@ -16,5 +16,5 @@ var ItemsHoldr;

this.settings = settings;
this.prefix = settings.prefix || "";
this.autoSave = settings.autoSave;
this.callbackArgs = settings.callbackArgs || [];
this.prefix = settings.prefix || "";
this.allowNewItems = settings.allowNewItems === undefined

@@ -242,2 +242,8 @@ ? true : settings.allowNewItems;

/**
* Toggles this.autoSave.
*/
ItemsHoldr.prototype.toggleAutoSave = function () {
this.autoSave = !this.autoSave;
};
/**
* Ensures a key exists in values. If it doesn't, and new values are

@@ -661,3 +667,3 @@ * allowed, it creates it; otherwise, it throws an Error.

var value = this.ItemsHolder.getLocalStorage()[this.ItemsHolder.getPrefix() + this.key];
if (typeof value === "undefined") {
if (typeof value === "undefined" || value === "undefined") {
return undefined;

@@ -664,0 +670,0 @@ }

@@ -0,1 +1,3 @@

namespace ItemsHoldr {

@@ -497,5 +499,5 @@ /**

this.settings = settings;
this.prefix = settings.prefix || "";
this.autoSave = settings.autoSave;
this.callbackArgs = settings.callbackArgs || [];
this.prefix = settings.prefix || "";

@@ -761,2 +763,9 @@ this.allowNewItems = settings.allowNewItems === undefined

/**
* Toggles this.autoSave.
*/
public toggleAutoSave(): void {
this.autoSave = !this.autoSave;
}
/**
* Ensures a key exists in values. If it doesn't, and new values are

@@ -1307,3 +1316,3 @@ * allowed, it creates it; otherwise, it throws an Error.

if (typeof value === "undefined") {
if (typeof value === "undefined" || value === "undefined") {
return undefined;

@@ -1310,0 +1319,0 @@ }

{
"name": "itemsholdr",
"description": "A cache-based wrapper around localStorage.",
"version": "0.5.0",
"version": "0.5.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Josh Goldberg",

@@ -16,5 +16,5 @@ define(["require", "exports", "./ItemValue"], function (require, exports, ItemValue_1) {

this.settings = settings;
this.prefix = settings.prefix || "";
this.autoSave = settings.autoSave;
this.callbackArgs = settings.callbackArgs || [];
this.prefix = settings.prefix || "";
this.allowNewItems = settings.allowNewItems === undefined

@@ -242,2 +242,8 @@ ? true : settings.allowNewItems;

/**
* Toggles this.autoSave.
*/
ItemsHoldr.prototype.toggleAutoSave = function () {
this.autoSave = !this.autoSave;
};
/**
* Ensures a key exists in values. If it doesn't, and new values are

@@ -244,0 +250,0 @@ * allowed, it creates it; otherwise, it throws an Error.

@@ -77,5 +77,5 @@ import { IItemsHoldr, IItemsHoldrSettings, IItems } from "./IItemsHoldr";

this.settings = settings;
this.prefix = settings.prefix || "";
this.autoSave = settings.autoSave;
this.callbackArgs = settings.callbackArgs || [];
this.prefix = settings.prefix || "";

@@ -341,2 +341,9 @@ this.allowNewItems = settings.allowNewItems === undefined

/**
* Toggles this.autoSave.
*/
public toggleAutoSave(): void {
this.autoSave = !this.autoSave;
}
/**
* Ensures a key exists in values. If it doesn't, and new values are

@@ -343,0 +350,0 @@ * allowed, it creates it; otherwise, it throws an Error.

@@ -166,3 +166,3 @@ define(["require", "exports"], function (require, exports) {

var value = this.ItemsHolder.getLocalStorage()[this.ItemsHolder.getPrefix() + this.key];
if (typeof value === "undefined") {
if (typeof value === "undefined" || value === "undefined") {
return undefined;

@@ -169,0 +169,0 @@ }

@@ -270,3 +270,3 @@ import { IItemValue, ITriggers } from "./IItemValue";

if (typeof value === "undefined") {
if (typeof value === "undefined" || value === "undefined") {
return undefined;

@@ -273,0 +273,0 @@ }

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