ig-types 6.20.2 → 6.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/event.js +8 -4
  2. package/package.json +1 -1
package/event.js CHANGED
@@ -284,12 +284,16 @@ module.PureEvent =
284
284
  object.Constructor('PureEvent', Event, {
285
285
  toString: function(){
286
286
  return `PureEvent ${this.name}(){}`},
287
- __init__: function(name, options={}){
287
+ __init__: function(name, func, options={}){
288
+ if(typeof(func) != 'function'){
289
+ options = func
290
+ func = undefined }
288
291
  object.parentCall(PureEvent.prototype.__init__, this,
289
292
  name,
290
- function(handle, trigger){
291
- trigger === module.TRIGGER
292
- || handle(false) }, options) },
293
+ function(handle, trigger, args){
294
+ trigger === module.TRIGGER ?
295
+ func && func.call(this, handle, ...args)
296
+ : handle(false) }, options) },
293
297
  })
294
298
 
295
299
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ig-types",
3
- "version": "6.20.2",
3
+ "version": "6.20.3",
4
4
  "description": "Generic JavaScript types and type extensions...",
5
5
  "main": "main.js",
6
6
  "scripts": {