Comparing version 0.0.1 to 0.0.2
@@ -16,5 +16,5 @@ let listSections = {}; | ||
}); | ||
listSections[section].cache = data; | ||
listSections[section].called = true; | ||
listSections[section].isResolve = isResolve; | ||
listSections[section].events[name].cache = data; | ||
listSections[section].events[name].called = true; | ||
listSections[section].events[name].isResolve = isResolve; | ||
listSections[section].events[name].stack = listSections[section].events[name].stack.filter((elem, key) => { | ||
@@ -21,0 +21,0 @@ if (specificKey !== undefined && specificKey !== key) return elem; |
@@ -1,1 +0,1 @@ | ||
"use strict";var listSections={};module.exports=function(o){listSections[o=o||"default"]=listSections[o]?listSections[o]:{events:{}};var c=function(n,i){return function(e,t){listSections[o].events[e]=listSections[o].events[e]?listSections[o].events[e]:{cache:null,called:!1,isResolve:!1,stack:[]},listSections[o].cache=t,listSections[o].called=!0,listSections[o].isResolve=n,listSections[o].events[e].stack=listSections[o].events[e].stack.filter(function(e,s){return void 0!==i&&i!==s?e:(e.cb&&null!==e.cb&&!0===n&&!e.onlyData&&e.cb(null,t),e.cb&&null!==e.cb&&(!e.onlyData&&!1===n||!0===n&&e.onlyData)&&e.cb(t),!0===e.promise&&(listSections[o].isResolve?e.resolve(t):e.reject(t)),!e.isUnique)})}};return{resolve:c(!0),reject:c(!1),on:function(n,i,l){return l=l||{},listSections[o].events[n]=listSections[o].events[n]?listSections[o].events[n]:{cache:null,called:!1,isResolve:!1,stack:[]},new Promise(function(e,s){var t=listSections[o].events[n].stack.push({cb:i,resolve:e,reject:s,isUnique:"boolean"!=typeof l.isUnique||l.isUnique,onlyData:"boolean"==typeof l.onlyData&&l.onlyData,promise:"boolean"==typeof l.promise&&l.promise})-1;!0===listSections[o].events[n].called&&!0===l.cache&&(c(listSections[o].events[n].isResolve,t)(n,listSections[o].events[n].cache)),!0===l.removeCache&&(listSections[o].events[n].cache=null,listSections[o].events[n].called=!1,listSections[o].events[n].isResolve=!1)})}}}; | ||
"use strict";var listSections={};module.exports=function(o){listSections[o=o||"default"]=listSections[o]?listSections[o]:{events:{}};var c=function(n,i){return function(e,t){listSections[o].events[e]=listSections[o].events[e]?listSections[o].events[e]:{cache:null,called:!1,isResolve:!1,stack:[]},listSections[o].events[e].cache=t,listSections[o].events[e].called=!0,listSections[o].events[e].isResolve=n,listSections[o].events[e].stack=listSections[o].events[e].stack.filter(function(e,s){return void 0!==i&&i!==s?e:(e.cb&&null!==e.cb&&!0===n&&!e.onlyData&&e.cb(null,t),e.cb&&null!==e.cb&&(!e.onlyData&&!1===n||!0===n&&e.onlyData)&&e.cb(t),!0===e.promise&&(listSections[o].isResolve?e.resolve(t):e.reject(t)),!e.isUnique)})}};return{resolve:c(!0),reject:c(!1),on:function(n,i,l){return l=l||{},listSections[o].events[n]=listSections[o].events[n]?listSections[o].events[n]:{cache:null,called:!1,isResolve:!1,stack:[]},new Promise(function(e,s){var t=listSections[o].events[n].stack.push({cb:i,resolve:e,reject:s,isUnique:"boolean"!=typeof l.isUnique||l.isUnique,onlyData:"boolean"==typeof l.onlyData&&l.onlyData,promise:"boolean"==typeof l.promise&&l.promise})-1;!0===listSections[o].events[n].called&&!0===l.cache&&(c(listSections[o].events[n].isResolve,t)(n,listSections[o].events[n].cache)),!0===l.removeCache&&(listSections[o].events[n].cache=null,listSections[o].events[n].called=!1,listSections[o].events[n].isResolve=!1)})}}}; |
{ | ||
"name": "eventm", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Manage all events in your app", | ||
@@ -5,0 +5,0 @@ "main": "eventm.min.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
10110