Comparing version 0.0.2 to 0.0.3
@@ -16,2 +16,3 @@ let listSections = {}; | ||
}); | ||
listSections[section].events[name].cache = data; | ||
@@ -24,3 +25,3 @@ listSections[section].events[name].called = true; | ||
if (elem.cb && elem.cb !== null && ((!elem.onlyData && isResolve === false) || (isResolve === true && elem.onlyData))) elem.cb(data); | ||
if (elem.promise === true) (listSections[section].isResolve ? elem.resolve(data) : elem.reject(data)); | ||
if (elem.promise === true) (listSections[section].events[name].isResolve ? elem.resolve(data) : elem.reject(data)); | ||
return !elem.isUnique; | ||
@@ -27,0 +28,0 @@ }); |
@@ -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].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)})}}}; | ||
"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].events[e].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.2", | ||
"version": "0.0.3", | ||
"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
10137