{"name":"aggregate-error","version":"1.0.0","description":"Create an error from multiple errors","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/aggregate-error.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["aggregate","error","err","combine","multiple","many","collection","iterable","iterator"],"dependencies":{"clean-stack":"^1.0.0","indent-string":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"dc4c1bffe452a1e18dd1f0ced2aaf46d37d38048","bugs":{"url":"https://github.com/sindresorhus/aggregate-error/issues"},"homepage":"https://github.com/sindresorhus/aggregate-error#readme","_id":"aggregate-error@1.0.0","_shasum":"888344dad0220a72e3af50906117f48771925fac","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.2","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"888344dad0220a72e3af50906117f48771925fac","tarball":"http://registry-npm.ywwl.com/aggregate-error/download/aggregate-error-1.0.0.tgz","integrity":"sha512-7heCOdGepPfjajU0Hi8wJypLsZIB6AeDN/YzW+Mmy8QU7iaEW579WzA9cWbke3cGYwmBazCVL2Zzdhq+iQ6pBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEoxMTf1Mn7benDJTcJbJD5M/vL8HSSGIFh0yDV0l62QIhAKzp9cMc+HLA6/NH+FLoLpl8VD1zL8MDjA+YXItj0Wvz"}],"size":2202,"noattachment":false,"key":"/aggregate-error/-/aggregate-error-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/aggregate-error-1.0.0.tgz_1484302194233_0.6430134251713753"},"directories":{},"readme":"# aggregate-error\n\n> Create an error from multiple errors\n\n*Note: With [Node.js 15](https://medium.com/@nodejs/node-js-v15-0-0-is-here-deb00750f278), there's now a built-in [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) type.*\n\n## Install\n\n```sh\nnpm install aggregate-error\n```\n\n## Usage\n\n```js\nimport AggregateError from 'aggregate-error';\n\nconst error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);\n\nthrow error;\n/*\nAggregateError:\n    Error: foo\n        at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)\n    Error: bar\n        at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)\n    Error: baz\n        at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)\n    at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)\n    at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)\n    at Module._compile (module.js:556:32)\n    at Object.Module._extensions..js (module.js:565:10)\n    at Module.load (module.js:473:32)\n    at tryModuleLoad (module.js:432:12)\n    at Function.Module._load (module.js:424:3)\n    at Module.runMain (module.js:590:10)\n    at run (bootstrap_node.js:394:7)\n    at startup (bootstrap_node.js:149:9)\n*/\n\nfor (const individualError of error.errors) {\n\tconsole.log(individualError);\n}\n//=> [Error: foo]\n//=> [Error: bar]\n//=> [Error: baz]\n```\n\n## API\n\n### AggregateError(errors)\n\nReturns an `Error`.\n\n#### errors\n\nType: `Array<Error|object|string>`\n\nIf a string, a new `Error` is created with the string as the error message.\\\nIf a non-Error object, a new `Error` is created with all properties from the object copied over.\n","publish_time":1484302194467,"_cnpm_publish_time":1484302194467,"dist-tags":{"latest":"5.1.0"}}