Comparing version 1.0.1 to 1.0.2
@@ -10,14 +10,9 @@ "use strict"; | ||
var isEqual = require("./utils").isEqual; | ||
var Action = require("./Action"); | ||
var EventName = require("./EventName"); | ||
var NS_SEPARATOR_CHAR = "#"; | ||
var events = ["added", "modified", "removed", "cleared"]; | ||
var events = [EventName.added, EventName.modified, EventName.removed, EventName.cleared]; | ||
var Action = { | ||
none: 0, | ||
added: 1, | ||
modified: 2, | ||
removed: 3 | ||
}; | ||
function throwUninitializedError() { | ||
@@ -79,3 +74,3 @@ throw new Error("[Storeit] you must first call `load`"); | ||
storageProvider.removeItem(mkey(key)); | ||
publish("removed", value, key); | ||
publish(EventName.removed, value, key); | ||
return value; | ||
@@ -102,3 +97,3 @@ } | ||
cache[key].value = value; | ||
publish("modified", partial, key); | ||
publish(EventName.modified, partial, key); | ||
results.action = Action.modified; | ||
@@ -111,3 +106,3 @@ } | ||
}; | ||
publish("added", cloneObject(value), key); | ||
publish(EventName.added, cloneObject(value), key); | ||
results.action = Action.added; | ||
@@ -244,3 +239,3 @@ } | ||
storageProvider.removeItem(namespace); // Remove the storageMetadata for the namespace. | ||
publish("cleared"); | ||
publish(EventName.cleared); | ||
}; | ||
@@ -285,3 +280,4 @@ | ||
Storeit.Action = Action; | ||
Storeit.EventName = EventName; | ||
module.exports = Storeit; |
{ | ||
"name": "storeit", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Library for working with Storage.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/Storeit.js", |
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
32595
13
318