@fromscratch/store
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.1
@@ -1,1 +0,1 @@ | ||
"use strict";exports.__esModule=!0;var t=function(){return function(){var t=this;this.data=new Map,this.subscriptions=new Map,this.get=function(s,n){return t.data.get(s)||n},this.set=function(s,n){t.data.set(s,n);var e=t.subscriptions.get(s);e&&e.forEach(function(t){return t(n)})},this.delete=function(s){t.data.delete(s);var n=t.subscriptions.get(s);n&&n.forEach(function(t){return t()})},this.subscribe=function(s,n){var e=t.subscriptions.get(s);return e?t.subscriptions.set(s,e.concat([n])):t.subscriptions.set(s,[n]),function(){return t.unsubscribe(s,n)}},this.unsubscribe=function(s,n){var e=t.subscriptions.get(s);t.subscriptions.set(s,e.filter(function(t){return t!==n}))}}}();exports.default=t,module.exports=t,module.exports.default=t; | ||
"use strict";var t=this&&this.__spreadArrays||function(){for(var t=0,s=0,r=arguments.length;s<r;s++)t+=arguments[s].length;var n=Array(t),e=0;for(s=0;s<r;s++)for(var i=arguments[s],u=0,o=i.length;u<o;u++,e++)n[e]=i[u];return n};exports.__esModule=!0;var s=function(){return function(){var s=this;this.data=new Map,this.subscriptions=new Map,this.get=function(t,r){return s.data.get(t)||r},this.set=function(t,r){s.data.set(t,r);var n=s.subscriptions.get(t);n&&n.forEach(function(t){return t(r)})},this.delete=function(t){s.data.delete(t);var r=s.subscriptions.get(t);r&&r.forEach(function(t){return t()})},this.subscribe=function(r,n){var e=s.subscriptions.get(r);return e?s.subscriptions.set(r,t(e,[n])):s.subscriptions.set(r,[n]),function(){return s.unsubscribe(r,n)}},this.unsubscribe=function(t,r){var n=s.subscriptions.get(t);s.subscriptions.set(t,n.filter(function(t){return t!==r}))}}}();exports.default=s,module.exports=s,module.exports.default=s; |
{ | ||
"name": "@fromscratch/store", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.1", | ||
"description": "The simplest store", | ||
@@ -5,0 +5,0 @@ "main": "dist/store.js", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3405
1