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

storeit

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storeit - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

LICENSE

4

package.json
{
"name": "storeit",
"version": "1.0.3",
"description": "A client side key/value storage system that publishes events.",
"version": "1.0.4",
"description": "A key/value storage system that publishes events.",
"main": "./lib/Storeit.js",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/YuzuJS/storeit",

Storeit! [![Build Status](https://travis-ci.org/YuzuJS/storeit.svg)](https://travis-ci.org/YuzuJS/storeit)
=======
Storeit is client side key/value storage system that publishes events. You can have multiple "stores". It supports different storage "providers" (ex: WebStorage) by means on dependency injection.
Storeit is a key/value storage system that publishes events. You can have multiple "stores". It supports different storage "providers" (ex: WebStorage) by means on dependency injection.

@@ -21,3 +21,3 @@ ### Get the package

**_ Storeit(namespace:string, storageProvider:Provider, logger?:Function):Storeit _**
**Storeit(namespace:string, storageProvider:Provider, logger?:Function):Storeit**

@@ -89,3 +89,3 @@ In order to use StoreIt, you must instantiate an instance. It takes two required and one optional parameter as follows:

**_ store.has(key:string):Boolean _**
**store.has(key:string):Boolean**

@@ -97,5 +97,5 @@ Returns `true` if the key is found.

**_ store.set(key:string, value:Object):Result _**
**store.set(key:string, value:Object):Result**
This will add (if the key does not exist) or modify (if exists) an object in the store.
This will add (if the key does not exist) or modify (if it exists) an object in the store.

@@ -108,2 +108,4 @@ Where:

To tell if the operation added a new key, or modified an existing key, you can look at the `action` property of the returned `Result` object.
Example (assuming key does not exist):

@@ -122,7 +124,7 @@ ```javascript

**Note:** This will also publish either an `added` or a `modified` event.
**Note:** This will also publish either an `EventName.added` or a `EventName.modified` event.
#### `store.get`
**_ store.get(key:string, defaultValue?:Any):Any _**
**store.get(key:string, defaultValue?:Any):Any**

@@ -145,3 +147,3 @@ This will get an object in the store that matches `key`. If no key exists, the `defaultValue` is returned.

**_ store.getAll():Any[] _**
**store.getAll():Any[]**

@@ -152,3 +154,3 @@ Returns an array of all objects in the store.

**_ store.getAllFilteredByProperty(propName:string, propValue:Any):Any[] _**
**store.getAllFilteredByProperty(propName:string, propValue:Any):Any[]**

@@ -169,3 +171,3 @@ Returns an array of all objects in the store filters by property. StoreIt will use the propName as the key and if it matches propValue, the value wil be included in the array.

**_ store.remove(key:string):Result _**
**store.remove(key:string):Result**

@@ -179,3 +181,3 @@ Removes a key from the store. If they key is not found, a "key doesn't exist" exception is thrown.

**_ store.delete(key:string):Result _**
**store.delete(key:string):Result**

@@ -186,3 +188,3 @@ This is an ES5 friendly version of `store.remove`. Use only if your application will be running only on modern browser.

**_ store.forEach(callback:Function< key:string, value:Any >):Void _**
**store.forEach(callback:Function< key:string, value:Any >):Void**

@@ -200,3 +202,3 @@ Storeit will call `callback` once for each item in the store.

**_ store.clear():Void _**
**store.clear():Void**

@@ -209,3 +211,3 @@ Deletes all keys from the store.

**_ store.load():Void _**
**store.load():Void**

@@ -218,3 +220,3 @@ Loads all keys from the store's data store. You MUST call `load` before using the store object.

**_ store.on(eventName:EventName, callback:Function< value:Any, key:string >):Void _**
**store.on(eventName:EventName, callback:Function< value:Any, key:string >):Void**

@@ -236,3 +238,3 @@ Listens for published events.

**_ store.once(eventName:EventName, callback:Function< value:Any, key:string >):Void _**
**store.once(eventName:EventName, callback:Function< value:Any, key:string >):Void**

@@ -243,3 +245,3 @@ Same as `store.on` but automatically removes the listener after the first event.

**_ store.off(eventName:EventName, callback:Function):Void _**
**store.off(eventName:EventName, callback:Function):Void**

@@ -257,3 +259,3 @@ Stops listening to published events.

**_ store.keys:string[] _**
**store.keys:string[]**

@@ -264,3 +266,3 @@ An array representing every key in the store.

**_ store.namespace:string _**
**store.namespace:string**

@@ -271,3 +273,3 @@ The namespace that you passed to the constructor.

**_ store.options:Options _**
**store.options:Options**

@@ -274,0 +276,0 @@ Where `Options` has the following properties:

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