atom.storage
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -138,3 +138,3 @@ "use strict"; | ||
for (var k in options) { | ||
if (options[k] !== oldOptions[k]) throw new Error("atom.storage: Created two atoms with same storage and key " + show(key) + ", but different " + show(k) + ": first " + show(oldOptions[k]) + " and later " + show(options[k]) + "."); | ||
if (!R.equals(options[k], oldOptions[k])) throw new Error("atom.storage: Created two atoms with same storage and key " + show(key) + ", but different " + show(k) + ": first " + show(oldOptions[k]) + " and later " + show(options[k]) + "."); | ||
} | ||
@@ -145,2 +145,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hdG9tLnN0b3JhZ2UuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O0lBQVk7Ozs7OztBQUVaLElBQU0sV0FBVyxJQUFJLE9BQUosRUFBWDtBQUNOLElBQUksb0JBQUo7QUFDQSxJQUFJLFFBQVEsUUFBUixLQUFxQixZQUFyQixFQUNGLGNBQWMsSUFBSSxPQUFKLEVBQWQsQ0FERjs7QUFHQSxJQUFNLFdBQVcsU0FBWCxRQUFXLFVBQVc7QUFDMUIsTUFBSSxRQUFRLFNBQVMsR0FBVCxDQUFhLE9BQWIsQ0FBUixDQURzQjtBQUUxQixNQUFJLENBQUMsS0FBRCxFQUNGLFNBQVMsR0FBVCxDQUFhLE9BQWIsRUFBc0IsUUFBUSxFQUFSLENBQXRCLENBREY7QUFFQSxTQUFPLEtBQVAsQ0FKMEI7Q0FBWDs7QUFPakIsSUFBTSxXQUFXLFNBQVgsUUFBVyxPQUFRO0FBQ3ZCLE1BQUk7QUFDRixXQUFPLEtBQUssS0FBTCxDQUFXLElBQVgsQ0FBUCxDQURFO0dBQUosQ0FFRSxPQUFPLEtBQVAsRUFBYztBQUNkLFdBQU8sS0FBUCxDQURjO0dBQWQ7Q0FIYTs7QUFRakIsSUFBTSxhQUNKL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WYWx1ZSkpIHtcbiAgICAgICAgc3RvcmFnZS5yZW1vdmVJdGVtKGtleSlcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnN0IGRhdGEgPSB7dmFsdWV9XG5cbiAgICAgICAgaWYgKHNjaGVtYSAhPT0gdW5kZWZpbmVkKVxuICAgICAgICAgIGRhdGEuc2NoZW1hID0gc2NoZW1hXG5cbiAgICAgICAgaWYgKDAgPD0gdGltZSlcbiAgICAgICAgICBkYXRhLmV4cGlyZXMgPSB0aW1lICsgRGF0ZS5ub3coKVxuXG4gICAgICAgIHN0b3JhZ2Uuc2V0SXRlbShrZXksIEpTT04uc3RyaW5naWZ5KGRhdGEpKVxuICAgICAgfVxuICAgIH0pXG4gIH0gZWxzZSBpZiAocHJvY2Vzcy5OT0RFX0VOViAhPT0gXCJwcm9kdWN0aW9uXCIpIHtcbiAgICBjb25zdCBvbGRPcHRpb25zID0gdXNlZE9wdGlvbnMuZ2V0KGF0b20pXG4gICAgZm9yIChjb25zdCBrIGluIG9wdGlvbnMpIHtcbiAgICAgIGlmICghUi5lcXVhbHMob3B0aW9uc1trXSwgb2xkT3B0aW9uc1trXSkpXG4gICAgICAgIHRocm93IG5ldyBFcnJvcihgYXRvbS5zdG9yYWdlOiBDcmVhdGVkIHR3byBhdG9tcyB3aXRoIHNhbWUgc3RvcmFnZSBhbmQga2V5ICR7c2hvdyhrZXkpfSwgYnV0IGRpZmZlcmVudCAke3Nob3coayl9OiBmaXJzdCAke3Nob3cob2xkT3B0aW9uc1trXSl9IGFuZCBsYXRlciAke3Nob3cob3B0aW9uc1trXSl9LmApXG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGF0b21cbn1cbiJdfQ== |
{ | ||
"name": "atom.storage", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Reactive variables with Storage", | ||
@@ -5,0 +5,0 @@ "main": "lib/atom.storage.js", |
@@ -115,3 +115,3 @@ import * as R from "ramda" | ||
for (const k in options) { | ||
if (options[k] !== oldOptions[k]) | ||
if (!R.equals(options[k], oldOptions[k])) | ||
throw new Error(`atom.storage: Created two atoms with same storage and key ${show(key)}, but different ${show(k)}: first ${show(oldOptions[k])} and later ${show(options[k])}.`) | ||
@@ -118,0 +118,0 @@ } |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
40912
0