Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spex

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spex - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

2

API.md

@@ -53,3 +53,3 @@ ## Modules

**Summary**: Attempts to resolve every value in the input array.
**Returns**: <code>Promise</code> - Result for the entire batch, which resolves when every promise in the input array has been resolved, and rejects when one or more promise objects in the array rejected: - resolves with an array of individual resolved results, the same as `promise.all`; The array comes extended with property `duration` - number of milliseconds taken to resolve all the data. - rejects with an array of objects `{success, result}`: - `success`: `true/false`, indicates whether the corresponding value in the input array was resolved. - `result`: resolved data, if `success=true`, or else the rejection reason. The array comes extended with function `getErrors`, which returns the list of just errors, with support for nested batch results. Calling `getErrors()[0]`, for example, will get the same result as the rejection reason that `promise.all` would provide. In both cases the output array is always the same size as the input one, providing index mapping between input and output values.
**Returns**: <code>Promise</code> - Result for the entire batch, which resolves when every promise in the input array has been resolved, and rejects when one or more promise objects in the array rejected: - resolves with an array of individual resolved results, the same as `promise.all`; The array comes extended with read-only property `duration` - number of milliseconds taken to resolve all the data. - rejects with an array of objects `{success, result}`: - `success`: `true/false`, indicates whether the corresponding value in the input array was resolved. - `result`: resolved data, if `success=true`, or else the rejection reason. The array comes extended with function `getErrors`, which returns the list of just errors, with support for nested batch results. Calling `getErrors()[0]`, for example, will get the same result as the rejection reason that `promise.all` would provide. In both cases the output array is always the same size as the input one, providing index mapping between input and output values.
<table>

@@ -56,0 +56,0 @@ <thead>

@@ -33,4 +33,4 @@ 'use strict';

*
* The array comes extended with property `duration` - number of milliseconds
* taken to resolve all the data.
* The array comes extended with read-only property `duration` - number of
* milliseconds taken to resolve all the data.
*

@@ -37,0 +37,0 @@ * - rejects with an array of objects `{success, result}`:

@@ -73,5 +73,5 @@ 'use strict';

var method = require('./ext/' + name)(promise);
utils.extend(obj, name, method);
utils.property(obj, name, method);
}
module.exports = main;

@@ -15,6 +15,5 @@ 'use strict';

////////////////////////////////////////
// Extends an object with an enumerable
// read-only method or property.
function extend(obj, name, value) {
/////////////////////////////////////////////////////
// Sets a read-only enumerable property on an object.
function property(obj, name, value) {
Object.defineProperty(obj, name, {

@@ -27,6 +26,18 @@ value: value,

/////////////////////////////////////////////////////
// Extends an object with a non-enumerable read-only
// method or property.
function extend(obj, name, value) {
Object.defineProperty(obj, name, {
value: value,
enumerable: false,
writable: false
});
}
module.exports = {
isNull: isNull,
isPromise: isPromise,
property: property,
extend: extend
};
{
"name": "spex",
"version": "0.0.11",
"version": "0.0.12",
"description": "Specialized Promise Extensions",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc