@thednp/event-listener
Advanced tools
Comparing version 2.0.0-alpha1 to 2.0.0-alpha2
"use strict"; | ||
/*! | ||
* Listener v2.0.0alpha1 (https://thednp.github.io/event-listener) | ||
* Listener v2.0.0alpha2 (https://thednp.github.io/event-listener) | ||
* Copyright 2022 © thednp | ||
@@ -5,0 +5,0 @@ * Licensed under MIT (https://thednp.github.io/event-listener/blob/main/LICENSE) |
@@ -1,3 +0,3 @@ | ||
"use strict";// Listener v2.0.0alpha1 | thednp © 2022 | MIT-License | ||
"use strict";// Listener v2.0.0alpha2 | thednp © 2022 | MIT-License | ||
var v=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var l=(n,t)=>{for(var o in t)v(n,o,{get:t[o],enumerable:!0})},M=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of L(t))!h.call(n,e)&&e!==o&&v(n,e,{get:()=>t[e],enumerable:!(i=g(t,e))||i.enumerable});return n};var O=n=>M(v({},"__esModule",{value:!0}),n);var b={};l(b,{EventRegistry:()=>r,addListener:()=>p,default:()=>z,globalListener:()=>d,removeListener:()=>f});module.exports=O(b);var r={};function d(n){let t=this,{type:o}=n;[...r[o]].forEach(i=>{let[e,s]=i;e===t&&[...s].forEach(a=>{let[c,E]=a;c.apply(e,[n]),E&&E.once&&f(e,o,c,E)})})}var p=(n,t,o,i)=>{r[t]||(r[t]=new Map);let e=r[t];e.has(n)||e.set(n,new Map);let s=e.get(n),{size:a}=s;s.set(o,i),a||n.addEventListener(t,d,i)},f=(n,t,o,i)=>{let e=r[t],s=e&&e.get(n),a=s&&s.get(o),c=a!==void 0?a:i;s&&s.has(o)&&s.delete(o),e&&(!s||!s.size)&&e.delete(n),(!e||!e.size)&&delete r[t],(!s||!s.size)&&n.removeEventListener(t,d,c)},x={on:p,off:f,globalListener:d,registry:r},z=x; | ||
//# sourceMappingURL=index.cjs.min.js.map |
/*! | ||
* Listener v2.0.0alpha1 (https://thednp.github.io/event-listener) | ||
* Listener v2.0.0alpha2 (https://thednp.github.io/event-listener) | ||
* Copyright 2022 © thednp | ||
@@ -4,0 +4,0 @@ * Licensed under MIT (https://thednp.github.io/event-listener/blob/main/LICENSE) |
@@ -1,3 +0,3 @@ | ||
// Listener v2.0.0alpha1 | thednp © 2022 | MIT-License | ||
// Listener v2.0.0alpha2 | thednp © 2022 | MIT-License | ||
var i={};function E(n){let s=this,{type:o}=n;[...i[o]].forEach(r=>{let[t,e]=r;t===s&&[...e].forEach(a=>{let[c,d]=a;c.apply(t,[n]),d&&d.once&&v(t,o,c,d)})})}var f=(n,s,o,r)=>{i[s]||(i[s]=new Map);let t=i[s];t.has(n)||t.set(n,new Map);let e=t.get(n),{size:a}=e;e.set(o,r),a||n.addEventListener(s,E,r)},v=(n,s,o,r)=>{let t=i[s],e=t&&t.get(n),a=e&&e.get(o),c=a!==void 0?a:r;e&&e.has(o)&&e.delete(o),t&&(!e||!e.size)&&t.delete(n),(!t||!t.size)&&delete i[s],(!e||!e.size)&&n.removeEventListener(s,E,c)},p={on:f,off:v,globalListener:E,registry:i},g=p;export{i as EventRegistry,f as addListener,g as default,E as globalListener,v as removeListener}; | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "@thednp/event-listener", | ||
"author": "thednp", | ||
"version": "2.0.0alpha1", | ||
"version": "2.0.0alpha2", | ||
"description": "Modern event listener for efficient web applications based on subscribe-publish pattern.", | ||
@@ -45,9 +45,7 @@ "license": "MIT", | ||
"coverage:report": "nyc report --reporter=lcov --reporter=json --reporter=text --reporter=json-summary", | ||
"build": "npm run fix:ts && npm-run-all --parallel build-*", | ||
"fix:ts": "eslint src/ --fix", | ||
"lint:ts": "eslint src/", | ||
"build:ts": "del-cli --force ./types && tsc -d --removeComments --emitDeclarationOnly --declarationMap --outDir ./types", | ||
"build-js": "node esbuild.config.js FORMAT:iife", | ||
"build": "del-cli --force dist && npm run fix:ts && npm-run-all --parallel build-*", | ||
"build-docs": "node esbuild.config.js FORMAT:iife OUTPUTFILE:docs/event-listener.js", | ||
"build-minjs": "node esbuild.config.js MIN:true FORMAT:iife", | ||
"build-esm": "node esbuild.config.js", | ||
@@ -54,0 +52,0 @@ "build-minesm": "node esbuild.config.js MIN:true", |
@@ -22,6 +22,6 @@ ## EventListener | ||
# NPM | ||
# Install | ||
``` | ||
npm install @thednp/event-listener | ||
npm i @thednp/event-listener | ||
``` | ||
@@ -28,0 +28,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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1
45410
21
338