protoblast
Advanced tools
Comparing version 0.7.5 to 0.7.6
@@ -0,1 +1,7 @@ | ||
## 0.7.6 (2020-12-10) | ||
* Add all Error classes to the Classes object | ||
* Allow removing all listeners of an informer | ||
* Fix `prepareProperty` and `enforceProperty` calls overriding the prototype | ||
## 0.7.5 (2020-11-12) | ||
@@ -2,0 +8,0 @@ |
@@ -223,2 +223,10 @@ const ERROR = Symbol('error'); | ||
}; | ||
}); | ||
}); | ||
Blast.Classes.EvalError = EvalError; | ||
Blast.Classes.RangeError = RangeError; | ||
Blast.Classes.ReferenceError = ReferenceError; | ||
Blast.Classes.SyntaxError = SyntaxError; | ||
Blast.Classes.TypeError = TypeError; | ||
Blast.Classes.URIError = URIError; | ||
Blast.Classes.AggregateError = Blast.Globals.AggregateError; |
@@ -1406,3 +1406,3 @@ var finished_constitutors = new WeakMap(), | ||
* @since 0.1.4 | ||
* @version 0.1.5 | ||
* @version 0.7.6 | ||
* | ||
@@ -1449,3 +1449,7 @@ * @param {Function} target Target object or function | ||
var doNext, | ||
if (this == this.constructor.prototype) { | ||
return; | ||
} | ||
let doNext, | ||
list, | ||
@@ -1522,3 +1526,3 @@ i; | ||
* @since 0.6.6 | ||
* @version 0.7.1 | ||
* @version 0.7.6 | ||
* | ||
@@ -1557,2 +1561,7 @@ * @param {Function} target Target object or function | ||
// Make sure this isn't called on the prototype | ||
if (this.constructor.prototype === this) { | ||
return; | ||
} | ||
this[setting_symbol] = true; | ||
@@ -1559,0 +1568,0 @@ |
@@ -604,2 +604,31 @@ /** | ||
/** | ||
* Remove all listeners | ||
* | ||
* @author Jelle De Loecker <jelle@develry.be> | ||
* @since 0.7.6 | ||
* @version 0.7.6 | ||
* | ||
*/ | ||
function _removeAllListeners() { | ||
let listener, | ||
entry, | ||
type, | ||
list; | ||
for (entry of this.simpleListeners) { | ||
type = entry[0]; | ||
this.removeAllListeners(type); | ||
} | ||
for (listener of this.filterListeners) { | ||
list = listener[1]; | ||
for (entry of list) { | ||
this.removeListener(entry[1], entry[0]); | ||
} | ||
} | ||
} | ||
/** | ||
* Remove all listeners for this type. | ||
@@ -611,3 +640,3 @@ * If the type is a string, all filter listeners listening to this type | ||
* @since 0.1.3 | ||
* @version 0.1.3 | ||
* @version 0.7.6 | ||
* | ||
@@ -618,3 +647,12 @@ * @param {String|Object} type | ||
var listeners, | ||
// If a null type is given, do nothing | ||
if (type == null) { | ||
if (arguments.length > 0) { | ||
return; | ||
} | ||
return _removeAllListeners.call(this); | ||
} | ||
let listeners, | ||
typeName, | ||
@@ -621,0 +659,0 @@ filter, |
{ | ||
"name": "protoblast", | ||
"description": "Native object expansion library", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"author": "Jelle De Loecker <jelle@elevenways.be>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
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
695565
28922