Socket
Socket
Sign inDemoInstall

protoblast

Package Overview
Dependencies
1
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.6 to 0.7.7

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## 0.7.7 (2021-01-21)
* Fix static Informer properties
* Fix `classWideEvents` no longer working on Informer instances
* Fix `Function.parallel()` not being able to handle promises like `Function.series()`
* Namespace functions will now also have the `.setStatic()` method
## 0.7.6 (2020-12-10)

@@ -2,0 +9,0 @@

41

lib/function_flow.js

@@ -330,3 +330,3 @@ /**

* @since 0.1.2
* @version 0.7.5
* @version 0.7.7
*/

@@ -509,18 +509,35 @@ Blast.defineStatic('Function', function parallel(_forceAsync, _limit, _tasks, _callback) {

function nextHandler(err, val) {
if (count == 1) {
err = new Error('Next handler has been called multiple times');
return doRejection(err);
} else if (count > 1) {
// Just ignore further calls
return;
}
count++;
return handler(next, err, val);
}
try {
tasks[next](function nextHandler(err, val) {
if (typeof tasks[next] == 'function') {
tasks[next](nextHandler);
} else {
pledge._addProgressPledge(tasks[next]);
if (count == 1) {
err = new Error('Next handler has been called multiple times');
return doRejection(err);
} else if (count > 1) {
// Just ignore further calls
return;
if (typeof tasks[next] != 'object') {
Blast.Classes.Pledge.resolve(tasks[next]).done(nextHandler);
} else {
Blast.Classes.Pledge.prototype.handleCallback.call(tasks[next], nextHandler);
}
}
} catch (err) {
count++;
if (stop) {
return;
}
return handler(next, err, val);
});
} catch (err) {
doRejection(err);

@@ -527,0 +544,0 @@ }

@@ -125,3 +125,3 @@ var finished_constitutors = new WeakMap(),

* @since 0.2.1
* @version 0.7.5
* @version 0.7.7
*

@@ -193,2 +193,6 @@ * @param {String} namespace

if (!result.setStatic) {
Blast.defineValue(result, 'setStatic', Collection.Function.prototype.setStatic);
}
// Create the namespace object

@@ -195,0 +199,0 @@ Obj.setPath(Blast.Classes, namespace, result);

@@ -12,6 +12,6 @@ /**

// Functions that only listen to the type (string)
Informer.prepareStaticProperty('simpleListeners', Object);
Informer.prepareStaticProperty('simpleListeners', () => new Map);
// Functions that listen but filter
Informer.prepareStaticProperty('filterListeners', Object);
Informer.prepareStaticProperty('filterListeners', () => new Map);

@@ -891,3 +891,3 @@ // List of all the types we're listening to

* @since 0.1.3
* @version 0.5.1
* @version 0.7.7
*

@@ -965,3 +965,3 @@ * @param {String|Object} type

for (cstr = this.constructor; cstr; cstr = cstr.super) {
if (cstr.filterListeners && (temp = cstr.filterListeners[types[i]])) {
if (cstr.filterListeners && (temp = cstr.filterListeners.get(types[i]))) {
if (listeners) {

@@ -1009,3 +1009,3 @@ listeners = listeners.concat(temp);

for (cstr = this.constructor; cstr; cstr = cstr.super) {
if (cstr.simpleListeners && (temp = cstr.simpleListeners[typeName])) {
if (cstr.simpleListeners && (temp = cstr.simpleListeners.get(typeName))) {
if (listeners) {

@@ -1012,0 +1012,0 @@ listeners = listeners.concat(temp);

{
"name": "protoblast",
"description": "Native object expansion library",
"version": "0.7.6",
"version": "0.7.7",
"author": "Jelle De Loecker <jelle@elevenways.be>",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc