Socket
Socket
Sign inDemoInstall

async-settle

Package Overview
Dependencies
5
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0

2

index.js

@@ -6,3 +6,3 @@ 'use strict';

function settle(fn, done) {
asyncDone(fn, function(error, result) {
asyncDone(fn, function (error, result) {
var settled = {};

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

{
"name": "async-settle",
"version": "1.0.0",
"version": "2.0.0",
"description": "Settle an async function.",

@@ -12,3 +12,3 @@ "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",

"engines": {
"node": ">= 0.10"
"node": ">= 10.13.0"
},

@@ -21,21 +21,26 @@ "main": "index.js",

"scripts": {
"lint": "eslint . && jscs index.js test/",
"lint": "eslint . ",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
"test": "nyc mocha --async-only"
},
"dependencies": {
"async-done": "^1.2.2"
"async-done": "^2.0.0"
},
"devDependencies": {
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"expect": "^1.19.0",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.3.5",
"jscs-preset-gulp": "^1.0.0",
"mocha": "^2.4.5"
"eslint": "^7.32.0",
"eslint-config-gulp": "^5.0.1",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.4.2",
"mocha": "^8.4.0",
"nyc": "^15.1.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [

@@ -42,0 +47,0 @@ "settle",

<p align="center">
<a href="http://gulpjs.com">
<a href="https://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">

@@ -9,3 +9,3 @@ </a>

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

@@ -25,9 +25,12 @@ Settle an async function. It will always complete successfully with an object of the resulting state.

asyncSettle(function(done){
// do async things
done(null, 2);
}, function(error, result){
// `error` will ALWAYS be null on execution of the first function.
// `result` will ALWAYS be a settled object with the result or error of the first function.
});
asyncSettle(
function (done) {
// do async things
done(null, 2);
},
function (error, result) {
// `error` will ALWAYS be null on execution of the first function.
// `result` will ALWAYS be a settled object with the result or error of the first function.
}
);
```

@@ -40,9 +43,12 @@

asyncSettle(function(done){
// do async things
done(new Error('Some Error Occurred'));
}, function(error, result){
// `error` will ALWAYS be null on execution of the first function.
// `result` will ALWAYS be a settled object with the result or error of the first function.
});
asyncSettle(
function (done) {
// do async things
done(new Error('Some Error Occurred'));
},
function (error, result) {
// `error` will ALWAYS be null on execution of the first function.
// `result` will ALWAYS be a settled object with the result or error of the first function.
}
);
```

@@ -82,19 +88,17 @@

[async-done]: https://github.com/gulpjs/async-done
[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution
[downloads-image]: http://img.shields.io/npm/dm/async-settle.svg
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/async-settle.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/async-settle
[npm-image]: http://img.shields.io/npm/v/async-settle.svg
[npm-image]: https://img.shields.io/npm/v/async-settle.svg?style=flat-square
[travis-url]: https://travis-ci.org/gulpjs/async-settle
[travis-image]: http://img.shields.io/travis/gulpjs/async-settle.svg?label=travis-ci
[ci-url]: https://github.com/gulpjs/async-settle/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/async-settle/dev?style=flat-square
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/async-settle
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/async-settle.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/async-settle
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/async-settle/master.svg
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-settle/master.svg?style=flat-square
<!-- prettier-ignore-end -->
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
<!-- prettier-ignore-start -->
[async-done]: https://github.com/gulpjs/async-done
[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution
<!-- prettier-ignore-end -->

Sorry, the diff of this file is not supported yet

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