@okikio/emitter
Advanced tools
Comparing version 1.3.0 to 2.0.0
@@ -5,2 +5,16 @@ # Changelog | ||
## [2.0.0](https://github.com/okikio/native/compare/@okikio/emitter@1.3.0...@okikio/emitter@2.0.0) (2021-01-13) | ||
### ⚠ BREAKING CHANGES | ||
* **@okikio/animate:** Pause & Play will work the native way regardless of current player state (this may | ||
cause unexpected errors) | ||
... | ||
### Bug Fixes | ||
* **@okikio/animate:** fix pause not working on looping animations ([20adbec](https://github.com/okikio/native/commit/20adbec8c18da39b80894c03a8ffd88aa5b11f40)) | ||
## [1.3.0](https://github.com/okikio/native/compare/@okikio/emitter@1.2.0...@okikio/emitter@1.3.0) (2021-01-04) | ||
@@ -7,0 +21,0 @@ |
@@ -1,2 +0,2 @@ | ||
var h=Object.defineProperty,g=s=>h(s,"__esModule",{value:!0}),m=(s,e)=>{g(s);for(var t in e)h(s,t,{get:e[t],enumerable:!0})};m(exports,{Event:()=>o,EventEmitter:()=>b,default:()=>y,newListener:()=>u});var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},f=(s,e,...t)=>{s.forEach(i=>{i[e](...t)})},u=({callback:s=()=>{},scope:e=null,name:t="event"})=>({callback:s,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],this.newListener(r,n,l)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,l)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(l)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],typeof n=="function"?this.removeListener(r,n,l):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:l}=n;a.apply(l,t)})},this),this)}clear(){return f(this,"clear"),super.clear(),this}},y=b; | ||
var h=Object.defineProperty;var g=s=>h(s,"__esModule",{value:!0});var m=(s,e)=>{g(s);for(var t in e)h(s,t,{get:e[t],enumerable:!0})};m(exports,{Event:()=>o,EventEmitter:()=>b,default:()=>y,newListener:()=>u});var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},f=(s,e,...t)=>{s.forEach(i=>{i[e](...t)})};var u=({callback:s=()=>{},scope:e=null,name:t="event"})=>({callback:s,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],this.newListener(r,n,l)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,l)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(l)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],typeof n=="function"?this.removeListener(r,n,l):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:l}=n;a.apply(l,t)})},this),this)}clear(){return f(this,"clear"),super.clear(),this}},y=b; | ||
//# sourceMappingURL=api.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},h=(c,e,...t)=>{c.forEach(i=>{i[e](...t)})},u=({callback:c=()=>{},scope:e=null,name:t="event"})=>({callback:c,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),s=a?t:i;return a||(n=t),Object.keys(e).forEach(l=>{a?(r=l,n=e[l]):r=e[l],this.newListener(r,n,s)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,s)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(s)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),s=a?t:i;return a||(n=t),Object.keys(e).forEach(l=>{a?(r=l,n=e[l]):r=e[l],typeof n=="function"?this.removeListener(r,n,s):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:s}=n;a.apply(s,t)})},this),this)}clear(){return h(this,"clear"),super.clear(),this}},f=b;export{o as Event,b as EventEmitter,f as default,u as newListener}; | ||
var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},h=(c,e,...t)=>{c.forEach(i=>{i[e](...t)})};var u=({callback:c=()=>{},scope:e=null,name:t="event"})=>({callback:c,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),s=a?t:i;return a||(n=t),Object.keys(e).forEach(l=>{a?(r=l,n=e[l]):r=e[l],this.newListener(r,n,s)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,s)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(s)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),s=a?t:i;return a||(n=t),Object.keys(e).forEach(l=>{a?(r=l,n=e[l]):r=e[l],typeof n=="function"?this.removeListener(r,n,s):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:s}=n;a.apply(s,t)})},this),this)}clear(){return h(this,"clear"),super.clear(),this}},f=b;export{o as Event,b as EventEmitter,f as default,u as newListener}; | ||
//# sourceMappingURL=api.es.js.map |
@@ -1,2 +0,2 @@ | ||
var emitter=(()=>{var h=Object.defineProperty,m=s=>h(s,"__esModule",{value:!0}),y=(s,e)=>{m(s);for(var t in e)h(s,t,{get:e[t],enumerable:!0})},d={};y(d,{Event:()=>o,EventEmitter:()=>b,default:()=>g,newListener:()=>u});var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},f=(s,e,...t)=>{s.forEach(i=>{i[e](...t)})},u=({callback:s=()=>{},scope:e=null,name:t="event"})=>({callback:s,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],this.newListener(r,n,l)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,l)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(l)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],typeof n=="function"?this.removeListener(r,n,l):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:l}=n;a.apply(l,t)})},this),this)}clear(){return f(this,"clear"),super.clear(),this}},g=b;return d;})(); | ||
var emitter=(()=>{var h=Object.defineProperty;var m=s=>h(s,"__esModule",{value:!0});var y=(s,e)=>{m(s);for(var t in e)h(s,t,{get:e[t],enumerable:!0})};var d={};y(d,{Event:()=>o,EventEmitter:()=>b,default:()=>g,newListener:()=>u});var p=class{constructor(e){this.map=new Map(e)}getMap(){return this.map}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}values(){return Array.from(this.map.values())}set(e,t){return this.map.set(e,t),this}add(e){let i=this.size;return this.set(i,e),this}get size(){return this.map.size}get length(){return this.map.size}last(e=1){let t=this.keys()[this.size-e];return this.get(t)}delete(e){return this.map.delete(e)}remove(e){return this.map.delete(e),this}clear(){return this.map.clear(),this}has(e){return this.map.has(e)}entries(){return this.map.entries()}forEach(e,t){return this.map.forEach(e,t),this}[Symbol.iterator](){return this.entries()}},f=(s,e,...t)=>{s.forEach(i=>{i[e](...t)})};var u=({callback:s=()=>{},scope:e=null,name:t="event"})=>({callback:s,scope:e,name:t}),o=class extends p{constructor(e="event"){super();this.name=e}},b=class extends p{constructor(){super()}getEvent(e){let t=this.get(e);return t instanceof o?t:(this.set(e,new o(e)),this.get(e))}newListener(e,t,i){let r=this.getEvent(e);return r.add(u({name:e,callback:t,scope:i})),r}on(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],this.newListener(r,n,l)},this),this}removeListener(e,t,i){let r=this.get(e);if(r instanceof o&&t){let n=u({name:e,callback:t,scope:i});r.forEach((a,l)=>{if(a.callback===n.callback&&a.scope===n.scope)return r.remove(l)})}return r}off(e,t,i){if(typeof e=="undefined")return this;typeof e=="string"&&(e=e.trim().split(/\s/g));let r,n,a=typeof e=="object"&&!Array.isArray(e),l=a?t:i;return a||(n=t),Object.keys(e).forEach(c=>{a?(r=c,n=e[c]):r=e[c],typeof n=="function"?this.removeListener(r,n,l):this.remove(r)},this),this}emit(e,...t){return typeof e=="undefined"?this:(typeof e=="string"&&(e=e.trim().split(/\s/g)),e.forEach(i=>{let r=this.get(i);r instanceof o&&r.forEach(n=>{let{callback:a,scope:l}=n;a.apply(l,t)})},this),this)}clear(){return f(this,"clear"),super.clear(),this}},g=b;return d;})(); | ||
//# sourceMappingURL=api.js.map |
{ | ||
"name": "@okikio/emitter", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "A small Event Emitter written in typescript with performance and ease of use in mind.", | ||
@@ -68,4 +68,4 @@ "publishConfig": { | ||
"dependencies": { | ||
"@okikio/manager": "1.3.0", | ||
"esbuild": "^0.8.29", | ||
"@okikio/manager": "2.0.0", | ||
"esbuild": "^0.8.31", | ||
"gzip-size": "^6.0.0", | ||
@@ -77,8 +77,8 @@ "pretty-bytes": "^5.5.0", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.19", | ||
"chokidar": "^3.4.3", | ||
"@types/jest": "^26.0.20", | ||
"chokidar": "^3.5.0", | ||
"esbuild-jest": "^0.3.0", | ||
"jest": "^26.6.3", | ||
"jest-chain": "^1.1.5", | ||
"ultra-runner": "^3.8.0" | ||
"ultra-runner": "^3.9.0" | ||
}, | ||
@@ -85,0 +85,0 @@ "gitHead": "ad422076cdb57d570426f786886129d5bca2f90f", |
@@ -0,0 +0,0 @@ # @okikio/emitter |
@@ -0,0 +0,0 @@ import { Manager, methodCall } from "@okikio/manager"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70492
+ Added@okikio/manager@2.0.0(transitive)
- Removed@okikio/manager@1.3.0(transitive)
Updated@okikio/manager@2.0.0
Updatedesbuild@^0.8.31