{
  "_id": "async-settle",
  "maintainers": [
    {
      "name": "yocontra",
      "email": "yo@contra.io"
    },
    {
      "name": "phated",
      "email": "blaine.bublitz@gmail.com"
    }
  ],
  "keywords": [
    "settle",
    "async",
    "async-done",
    "complete",
    "error",
    "parallel"
  ],
  "dist-tags": {
    "latest": "2.0.0"
  },
  "author": {
    "name": "Gulp Team",
    "email": "team@gulpjs.com",
    "url": "http://gulpjs.com/"
  },
  "_rev": "16-a7a08be85313d8ebeeca131349f74735",
  "description": "Settle an async function.",
  "readme": "<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# async-settle\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nSettle an async function. It will always complete successfully with an object of the resulting state.\n\nHandles completion and errors for callbacks, promises, observables and streams.\n\nWill run call the function on `nextTick`. This will cause all functions to be async.\n\n## Usage\n\n### Successful completion\n\n```js\nvar asyncSettle = require('async-settle');\n\nasyncSettle(\n  function (done) {\n    // do async things\n    done(null, 2);\n  },\n  function (error, result) {\n    // `error` will ALWAYS be null on execution of the first function.\n    // `result` will ALWAYS be a settled object with the result or error of the first function.\n  }\n);\n```\n\n### Failed completion\n\n```js\nvar asyncSettle = require('async-settle');\n\nasyncSettle(\n  function (done) {\n    // do async things\n    done(new Error('Some Error Occurred'));\n  },\n  function (error, result) {\n    // `error` will ALWAYS be null on execution of the first function.\n    // `result` will ALWAYS be a settled object with the result or error of the first function.\n  }\n);\n```\n\n## API\n\n### `asyncSettle(fn, callback)`\n\nTakes a function to execute (`fn`) and a function to call on completion (`callback`).\n\n#### `fn([done])`\n\nOptionally takes a callback (`done`) to call when async tasks are complete.\n\nExecuted in the context of [`async-done`][async-done], with all errors and results being settled.\n\nCompletion is handled by [`async-done` completion and error resolution][completions].\n\n#### `callback(error, result)`\n\nCalled on completion of `fn` and recieves a settled object as the `result` argument.\n\nThe `error` argument will always be `null`.\n\n#### Settled Object\n\nSettled values have two properties, `state` and `value`.\n\n`state` has two possible options `'error'` and `'success'`.\n\n`value` will be the value passed to original callback.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/async-settle.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/async-settle\n[npm-image]: https://img.shields.io/npm/v/async-settle.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/async-settle/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/async-settle/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/async-settle\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-settle/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n\n<!-- prettier-ignore-start -->\n[async-done]: https://github.com/gulpjs/async-done\n[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution\n<!-- prettier-ignore-end -->\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/gulpjs/async-settle.git"
  },
  "bugs": {
    "url": "https://github.com/gulpjs/async-settle/issues"
  },
  "license": "MIT",
  "versions": {
    "0.0.0": {
      "name": "async-settle",
      "version": "0.0.0",
      "description": "Settle your async functions - when you need to know all your parallel functions are complete (success or failure)",
      "main": "index.js",
      "directories": {
        "test": "test"
      },
      "scripts": {
        "test": "tap ./test"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/phated/async-settle"
      },
      "keywords": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "author": {
        "name": "Blaine Bublitz",
        "email": "blaine@iceddev.com",
        "url": "http://iceddev.com/"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/phated/async-settle/issues"
      },
      "homepage": "https://github.com/phated/async-settle",
      "devDependencies": {
        "tap": "^0.4.8"
      },
      "dependencies": {
        "async-done": "^0.2.0"
      },
      "_id": "async-settle@0.0.0",
      "dist": {
        "shasum": "954c2d09d60ab6bc6f082e3cc7a7855c43dc1a83",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-0.0.0.tgz",
        "integrity": "sha512-u9xlCvBez90KVSPgSu5a5gVr4rk/RZ1xAKrrCGiK6v/4H1aOo4oIQ/C5f3IQSzGqBm8D0lptby/ILINcMmAo0w==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIF5kQs5zRlC9b4dsAAsHyzrNR0R+oa0DAp+Z8VjoNu2gAiEAhV54jRX7bzqMxBqolkoh8rHbyCJVRv9sYvwlKj6mfAQ="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.4",
      "_npmUser": {
        "name": "phated",
        "email": "blaine@iceddev.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine@iceddev.com"
        }
      ]
    },
    "0.1.0": {
      "name": "async-settle",
      "version": "0.1.0",
      "description": "Settle your async functions - when you need to know all your parallel functions are complete (success or failure)",
      "main": "index.js",
      "directories": {
        "test": "test"
      },
      "scripts": {
        "test": "tap ./test"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/phated/async-settle"
      },
      "keywords": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "author": {
        "name": "Blaine Bublitz",
        "email": "blaine@iceddev.com",
        "url": "http://iceddev.com/"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/phated/async-settle/issues"
      },
      "homepage": "https://github.com/phated/async-settle",
      "devDependencies": {
        "tap": "^0.4.8"
      },
      "dependencies": {
        "async-done": "^0.2.0"
      },
      "_id": "async-settle@0.1.0",
      "dist": {
        "shasum": "94baf42904a3cfd7e845e03b3e61ad1fac893dcd",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-0.1.0.tgz",
        "integrity": "sha512-NfqlQ65Zi7IgsWmKPwbsNk7Ah6ssUHSGEK9VgegJKCQ2vHGNTPcbnQLifzaHvAjhNGH+8YFv8UJPNv574spFWw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIEQl07mbG2dQcYXMYi+ghKAcX4Ui71qw+22E9XyFqW92AiAL+ZUlTvuTv0mlRfjY3yBoZyumOqXLDTkdeCNBNlW7qg=="
          }
        ]
      },
      "_from": ".",
      "_npmVersion": "1.4.4",
      "_npmUser": {
        "name": "phated",
        "email": "blaine@iceddev.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine@iceddev.com"
        }
      ]
    },
    "0.2.0": {
      "name": "async-settle",
      "version": "0.2.0",
      "description": "Settle your async functions - when you need to know all your parallel functions are complete (success or failure)",
      "main": "index.js",
      "directories": {
        "test": "test"
      },
      "scripts": {
        "test": "tap ./test"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/phated/async-settle"
      },
      "keywords": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "author": {
        "name": "Blaine Bublitz",
        "email": "blaine@iceddev.com",
        "url": "http://iceddev.com/"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/phated/async-settle/issues"
      },
      "homepage": "https://github.com/phated/async-settle",
      "devDependencies": {
        "tap": "^0.4.8"
      },
      "dependencies": {
        "async-done": "^0.4.0"
      },
      "gitHead": "8cd515a6f02d02ac7e8bb712312782d6e233819e",
      "_id": "async-settle@0.2.0",
      "_shasum": "e291b78f4a0584d86c2a7e33d82c1ce669a259e8",
      "_from": ".",
      "_npmVersion": "1.4.21",
      "_npmUser": {
        "name": "phated",
        "email": "blaine@iceddev.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine@iceddev.com"
        }
      ],
      "dist": {
        "shasum": "e291b78f4a0584d86c2a7e33d82c1ce669a259e8",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-0.2.0.tgz",
        "integrity": "sha512-9VxNE42rLbTyd05VEElpag5ZrOq/4FLCyLojGao0qTZteFUe1sE1DA8NLIDnqATbbalWKoiey6BwmyLMkDpdYA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCICFqdXE4IXTMKD4vZaqaQjbLhQVAFHUCnR9C9kEsKDSLAiADBlEz6QXP1mmuYqD/wzWXgnezR5l4bUpRITgOLPDwrA=="
          }
        ]
      }
    },
    "0.2.1": {
      "name": "async-settle",
      "version": "0.2.1",
      "description": "Settle your async functions - when you need to know all your parallel functions are complete (success or failure)",
      "main": "index.js",
      "directories": {
        "test": "test"
      },
      "scripts": {
        "test": "tap ./test"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/phated/async-settle"
      },
      "keywords": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "author": {
        "name": "Blaine Bublitz",
        "email": "blaine@iceddev.com",
        "url": "http://iceddev.com/"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/phated/async-settle/issues"
      },
      "homepage": "https://github.com/phated/async-settle",
      "devDependencies": {
        "tap": "^0.4.8"
      },
      "dependencies": {
        "async-done": "^0.4.0"
      },
      "gitHead": "a1571d6caa3e883758cd4f083c9a1a93eedd6f22",
      "_id": "async-settle@0.2.1",
      "_shasum": "767462d5738008dc75eac4246223528f21371396",
      "_from": ".",
      "_npmVersion": "1.4.21",
      "_npmUser": {
        "name": "phated",
        "email": "blaine@iceddev.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine@iceddev.com"
        }
      ],
      "dist": {
        "shasum": "767462d5738008dc75eac4246223528f21371396",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-0.2.1.tgz",
        "integrity": "sha512-3b4i8Bf/9Zw3V/EsLtMx+qj2r0mDYotjMhzXJQxjvESOe5LgevY5KaH5BHROVZWHE7TlSY2FkeTgIgDvdkRFYQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIHppoj7BQ/uBilg2mn+oxuNlslLFBv2EpSgIq/hfrnlJAiEAu2TXVR2OPdaN8/XvWj1RgfVeNdAoJBaSb41B1vQu/xM="
          }
        ]
      }
    },
    "1.0.0": {
      "name": "async-settle",
      "version": "1.0.0",
      "description": "Settle an async function.",
      "author": {
        "name": "Gulp Team",
        "email": "team@gulpjs.com",
        "url": "http://gulpjs.com/"
      },
      "contributors": [
        {
          "name": "Blaine Bublitz",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "repository": {
        "type": "git",
        "url": "git+https://github.com/gulpjs/async-settle.git"
      },
      "license": "MIT",
      "engines": {
        "node": ">= 0.10"
      },
      "main": "index.js",
      "files": [
        "index.js",
        "LICENSE"
      ],
      "scripts": {
        "lint": "eslint . && jscs index.js test/",
        "pretest": "npm run lint",
        "test": "mocha --async-only",
        "cover": "istanbul cover _mocha --report lcovonly",
        "coveralls": "npm run cover && istanbul-coveralls"
      },
      "dependencies": {
        "async-done": "^1.2.2"
      },
      "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"
      },
      "keywords": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "gitHead": "96fc96809f72f179358279cc85318f73ad12db53",
      "bugs": {
        "url": "https://github.com/gulpjs/async-settle/issues"
      },
      "homepage": "https://github.com/gulpjs/async-settle#readme",
      "_id": "async-settle@1.0.0",
      "_shasum": "1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b",
      "_from": ".",
      "_npmVersion": "2.15.2",
      "_nodeVersion": "0.10.41",
      "_npmUser": {
        "name": "phated",
        "email": "blaine.bublitz@gmail.com"
      },
      "maintainers": [
        {
          "name": "phated",
          "email": "blaine@iceddev.com"
        }
      ],
      "dist": {
        "shasum": "1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-1.0.0.tgz",
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2j5rCRA9TVsSAnZWagAAVdwQAJO/mNFGyYmMQ7ztUrEs\nmgIsBoz4SrBr/BxQziRJlyrLJNAljVLMLHaZ/ap8PKm4VYsBv6PKBWpQMWb0\nn8Hz34w2i4pKr0mTAroZ3ORB2mOg2x+8MZOx1Pnhb2z/vh4zMOGdsjD3yvet\n4ENrcMBQdejSsi8AcZWZ0wVQJEt6B1n7O0ccZpR6d48dsMuEYDcbEX+DnXWO\ntR7iCqGjOKmOFdke9kq/CFURadDGPmZu8GODOaldqI8BfsuGKTTMbBlUPjin\n7eBe/BlQkI6R1fZIWmmTIOP2oRzNLdARL6ARoUD0/2PusDybQt1RmfHoCejr\nGtGSnQ02iUvIqHBcjJYwf07MPj4heZLAtHzGOvlPIxYQF3qGQz6rnHiXWMBh\ncXnSzNkjv1a6ojxMLNuLFYt6AcNqfRRwUESj1eP86GHRHla5WrqiVa9WisyL\nOW6Jix/DAV1db1G0ahO4Q7061SSHOq5utjO5h1bK8i1P/9fmLcVvZhULU0JX\n0sqVuQBNfS5sgAvGGaiicJsJACkIUtJwW0mzswuvQmXjCC3fxMLUYCi8aRuW\nDcdz4fouXsvJP0UpMTsOBhJrWC9xGcfnfwoEtqw/ONL5IQBe+aluso6uyr9l\nqE8OlNIXqXBxeMPqQAGPRUb69LHvUvv5EKSeEXcau/e5YaWnPpc3rkn4TKPk\nr+ne\r\n=A9s+\r\n-----END PGP SIGNATURE-----\r\n",
        "integrity": "sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIFjMGGztUot/Xl/3fi83o8sQ4Hx0cx4noTPjfLj+LmwXAiEA/9xae5G+Kh6GDgGRUTeNgp/b4XG1yWpxPJCDtVtd0H0="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "packages-16-east.internal.npmjs.com",
        "tmp": "tmp/async-settle-1.0.0.tgz_1466975095176_0.044924013782292604"
      },
      "directories": {}
    },
    "2.0.0": {
      "name": "async-settle",
      "version": "2.0.0",
      "description": "Settle an async function.",
      "author": {
        "name": "Gulp Team",
        "email": "team@gulpjs.com",
        "url": "http://gulpjs.com/"
      },
      "contributors": [
        {
          "name": "Blaine Bublitz",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "repository": {
        "type": "git",
        "url": "git+https://github.com/gulpjs/async-settle.git"
      },
      "license": "MIT",
      "engines": {
        "node": ">= 10.13.0"
      },
      "main": "index.js",
      "scripts": {
        "lint": "eslint . ",
        "pretest": "npm run lint",
        "test": "nyc mocha --async-only"
      },
      "dependencies": {
        "async-done": "^2.0.0"
      },
      "devDependencies": {
        "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": [
        "settle",
        "async",
        "async-done",
        "complete",
        "error",
        "parallel"
      ],
      "gitHead": "72b98659acbaea9ac1b5ab3b8105bac2625e2bf5",
      "bugs": {
        "url": "https://github.com/gulpjs/async-settle/issues"
      },
      "homepage": "https://github.com/gulpjs/async-settle#readme",
      "_id": "async-settle@2.0.0",
      "_nodeVersion": "16.14.2",
      "_npmVersion": "8.11.0",
      "dist": {
        "integrity": "sha512-Obu/KE8FurfQRN6ODdHN9LuXqwC+JFIM9NRyZqJJ4ZfLJmIYN9Rg0/kb+wF70VV5+fJusTMQlJ1t5rF7J/ETdg==",
        "shasum": "c695ad14e070f6a755d019d32d6eb38029020287",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/async-settle/-/async-settle-2.0.0.tgz",
        "fileCount": 4,
        "unpackedSize": 5520,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDzjAFm3mEXUdNe5BlgWNP77YnBL+7TgifLtxbJ9uZE6wIgER4MniMQEwppCXgLB9YI4j/3uyhSp7R8wzaA6efbw/M="
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitlkKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojmQ/8CAvu/eEwJeOTDCm//oPk7TAzodD8v+eHGGS335FNqiLhrme/\r\n/kwkzAk5neecefBVLwn3p7mAlHfgs9vbJZ+5bPrN5iHdj9et1nH5PML+2sOZ\r\nyzz3wCIEg9k3EASQf7vT5fckYaWao7xx1kB7NhTE0hbg0/7aN0tzEcpRtZZi\r\nwY3gm5a60Bd5MeF/JOTMRDpULXRVSMmLK1UwBU7NPX9z1PQ30RCXv6qgI91P\r\nzFf447LcssN+dAft8HgxPWDuG5guSAT/fYXE0WSuL2uKACE0aNCOn5MaHtPf\r\nVYwvexWEXx/A5cDEqeviKJbFHlPkQ5gcZjNV9BCUIY8iWh6+mIyIH3lXA/85\r\nODQzWjPQa8Xq1QR4hUBFdy4hRcrp3kCn2QH9ZQr0zhsAIo8K0HfPPRBCbhmH\r\nptVO5bsQ+aTRsHmQoq9C2/Z9MNM4J+94Jhm2gkbv7aGmwCewtZnuDfbC8PbT\r\nD4/bsdv6qM8EKhVYtQL6cK6zhQ79q7UK0G7SerZ9rzoA9OMC6c6nRP1SzyEG\r\nLrrWhT04GdorxgnFl2BaRZE3oNRT1qSR0H08YJiewBkcL2U3SOBYvGAt8K0y\r\nazn2ni7AhLZZY2Rorq0NzSws4oeOnKeFNOixVXn2w3YqBTijZY2affZsLLAN\r\nnMT4wLa4xN0OOWGYganqmpJ9jjYFzuMqNJI=\r\n=rMgg\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "phated",
        "email": "blaine.bublitz@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "yocontra",
          "email": "yo@contra.io"
        },
        {
          "name": "phated",
          "email": "blaine.bublitz@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/async-settle_2.0.0_1656117513847_0.04545783789318891"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "async-settle",
  "time": {
    "modified": "2026-05-20T15:56:46.499Z",
    "created": "2014-03-10T07:19:11.567Z",
    "0.0.0": "2014-03-10T07:19:11.567Z",
    "0.1.0": "2014-03-10T07:19:41.438Z",
    "0.2.0": "2014-08-23T04:34:50.205Z",
    "0.2.1": "2014-08-23T04:37:11.440Z",
    "1.0.0": "2016-06-26T21:04:59.171Z",
    "2.0.0": "2022-06-25T00:38:34.020Z"
  },
  "readmeFilename": "README.md",
  "contributors": [
    {
      "name": "Blaine Bublitz",
      "email": "blaine.bublitz@gmail.com"
    }
  ],
  "homepage": "https://github.com/gulpjs/async-settle#readme"
}