{"_id":"array-to-error","_rev":"6-7599c5f1f81f01a0852dafa32a0af6e0","name":"array-to-error","description":"Create an error from an array of error messages","dist-tags":{"latest":"1.1.1"},"versions":{"0.0.2":{"name":"array-to-error","version":"0.0.2","description":"Create an error instance from an array of error messages","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-error.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"bower install --production && eslint --config @shinnn index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"license":"MIT","files":["index.js"],"keywords":["err","error","arr","array","convert","join","concat","concatenate","concatenation","browser"],"dependencies":{"array-to-sentence":"^1.0.1"},"devDependencies":{"@shinnn/eslint-config":"^1.1.0","bower":"^1.5.3","eslint":"^1.6.0","istanbul":"^0.3.22","istanbul-coveralls":"^1.0.3","require-bower-files":"^3.0.0","tap-spec":"^4.1.0","tape":"^4.2.1"},"bugs":{"url":"https://github.com/shinnn/array-to-error/issues"},"homepage":"https://github.com/shinnn/array-to-error#readme","_id":"array-to-error@0.0.2","_shasum":"ffaab603e405189de7a54a1d677e0d4e1af052f1","_from":".","_npmVersion":"3.3.4","_nodeVersion":"4.1.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"ffaab603e405189de7a54a1d677e0d4e1af052f1","tarball":"https://registry.npmjs.org/array-to-error/-/array-to-error-0.0.2.tgz","integrity":"sha512-lLAmATBv9vz73JwNeYJGxc5RuEGN804zB/hbl7uIX2sPKPfT7OTuG9IZC6eEe2mSeJNl1VXzArt3BIPY5sXpqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWC34B9UMG1eA51dP2lXB1UWfGgyr7Ewy+F9KU5f2OZAiBj/xAYrSdCZ+5OZJDruuBaZY7U1+tNvUZRMq/zmxHrSQ=="}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}]},"1.0.0":{"name":"array-to-error","version":"1.0.0","description":"Create an error instance from an array of error messages","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-error.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"bower install --production && eslint --config @shinnn index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover -x=bower_components/array-to-sentence/* test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"license":"MIT","files":["index.js"],"keywords":["err","error","arr","array","convert","join","concat","concatenate","concatenation","browser"],"dependencies":{"array-to-sentence":"^1.0.1"},"devDependencies":{"@shinnn/eslint-config":"^1.1.0","bower":"^1.5.3","eslint":"^1.6.0","istanbul":"^0.3.22","istanbul-coveralls":"^1.0.3","require-bower-files":"^3.0.0","tap-spec":"^4.1.0","tape":"^4.2.1"},"gitHead":"695b3cf4787d330545c2ff077cdab4bea2eb3677","bugs":{"url":"https://github.com/shinnn/array-to-error/issues"},"homepage":"https://github.com/shinnn/array-to-error#readme","_id":"array-to-error@1.0.0","_shasum":"b716f73ca55304acf10c7676e379dc2b589592fd","_from":".","_npmVersion":"3.3.4","_nodeVersion":"4.1.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"b716f73ca55304acf10c7676e379dc2b589592fd","tarball":"https://registry.npmjs.org/array-to-error/-/array-to-error-1.0.0.tgz","integrity":"sha512-XXIj0vXPT3HZ3U8pcuTc4ZKN2G69BbC5Nw1jRZaO9tP8kThwkd2OXEdCWJf8bdUkvSsBekgO5HIAFckEsq605A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMRgt6sNEn4Tu45unClSK4DWSqzldmnbMvalj/NT2f5AiEA0c4L/k4JBBydDxsre9VSwElVcbcb5YF7iRDBGwjYRAU="}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}]},"1.1.0":{"name":"array-to-error","version":"1.1.0","description":"Create an error from an array of error messages","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-error.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"bower install --production && eslint --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover -x=bower_components/array-to-sentence/* test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["err","error","arr","array","convert","join","concat","concatenate","concatenation","browser"],"dependencies":{"array-to-sentence":"^1.0.4"},"devDependencies":{"@shinnn/eslint-config":"^2.3.0","bower":"^1.7.9","eslint":"^2.11.1","istanbul":"^0.4.3","require-bower-files":"^3.0.0","require-from-string":"^1.2.0","rollup":"^0.28.0","rollup-plugin-node-resolve":"^1.7.0","tap-spec":"^4.1.1","tape":"^4.5.1"},"gitHead":"61ec3f766ddaca55512303e7971c5add10d6f8e9","bugs":{"url":"https://github.com/shinnn/array-to-error/issues"},"homepage":"https://github.com/shinnn/array-to-error#readme","_id":"array-to-error@1.1.0","_shasum":"972d77dc288fca817195b1ddd9fe06280f1d3eed","_from":".","_npmVersion":"3.9.3","_nodeVersion":"5.9.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"972d77dc288fca817195b1ddd9fe06280f1d3eed","tarball":"https://registry.npmjs.org/array-to-error/-/array-to-error-1.1.0.tgz","integrity":"sha512-ABnJm3HzuIYpbGstf69A3uWb9pkeB136n2bPT96NhPrS9Z9MujvjKe1nx0bFoF1Q9tSR08P+idhv6MAvrQ58bw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC15lY1amW4Q+4Z01K0lo+NoavFj0ZRfsSljy1EOJYGxwIgHnkqHn724lFZ9m5SGNTZCHyUeCDjpzz6nda5at65XrM="}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/array-to-error-1.1.0.tgz_1465374599631_0.6322580666746944"}},"1.1.1":{"name":"array-to-error","version":"1.1.1","description":"Create an error from an array of error messages","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-error.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"bower install --production && eslint --fix --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js | tap-spec","coverage":"istanbul cover -x=bower_components/array-to-sentence/* test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["err","error","arr","array","convert","join","concat","concatenate","concatenation","browser"],"dependencies":{"array-to-sentence":"^1.1.0"},"devDependencies":{"@shinnn/eslint-config":"^2.4.0","bower":"^1.7.9","eslint":"^2.13.1","istanbul":"^0.4.4","require-bower-files":"^3.0.0","require-from-string":"^1.2.0","rollup":"^0.32.0","rollup-plugin-node-resolve":"^1.7.0","tap-spec":"^4.1.1","tape":"^4.6.0"},"gitHead":"bc6cfa993643f8b03675e0e9b90e5f5b5dbf89cb","bugs":{"url":"https://github.com/shinnn/array-to-error/issues"},"homepage":"https://github.com/shinnn/array-to-error#readme","_id":"array-to-error@1.1.1","_shasum":"d68812926d14097a205579a667eeaf1856a44c07","_from":".","_npmVersion":"3.9.3","_nodeVersion":"5.9.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"d68812926d14097a205579a667eeaf1856a44c07","tarball":"https://registry.npmjs.org/array-to-error/-/array-to-error-1.1.1.tgz","integrity":"sha512-kqcQ8s7uQfg3UViYON3kCMcck3A9exxgq+riVuKy08Mx00VN4EJhK30L2VpjE58LQHKhcE/GRpvbVUhqTvqzGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC//urvJfrKcUGDDik754TlKoDIraQ5xtyGeHF9VfezoQIhAMvw9EJRL4Da2MsodPTqhKQ1GSZfb4x90kGyjDWpgRJ6"}]},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/array-to-error-1.1.1.tgz_1466511963035_0.964898893609643"}}},"readme":"# array-to-error\n\n[![NPM version](https://img.shields.io/npm/v/array-to-error.svg)](https://www.npmjs.com/package/array-to-error)\n[![Build Status](https://travis-ci.org/shinnn/array-to-error.svg?branch=master)](https://travis-ci.org/shinnn/array-to-error)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/array-to-error.svg)](https://coveralls.io/github/shinnn/array-to-error?branch=master)\n[![Dependency Status](https://david-dm.org/shinnn/array-to-error.svg)](https://david-dm.org/shinnn/array-to-error)\n[![devDependency Status](https://david-dm.org/shinnn/array-to-error/dev-status.svg)](https://david-dm.org/shinnn/array-to-error#info=devDependencies)\n\nCreate an error from an array of error messages\n\n```javascript\nconst arrayToError = require('array-to-error');\n\nconst error = arrayToError(['tranling comma on line 1', 'unexpected \"(\" on line 2']);\nerror.message; //=> 'tranling comma on line 1\\nunexpected \"(\" on line 2'\nerror.reasons; //=> ['tranling comma on line 1', 'unexpected \"(\" on line 2']\n```\n\n## Installation\n\n#### [npm](https://www.npmjs.com/)\n\n```\nnpm install array-to-error\n```\n\n#### [Bower](https://bower.io/)\n\n```\nbower install array-to-error\n```\n\n## API\n\n```javascript\nconst arrayToError = require('array-to-error');\n```\n\n### arrayToError(*messages* [, *constructor*])\n\n*messages*: `Array` of strings  \n*constructor*: `Object` (One of the [error constructors](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types). [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) by default)  \nReturn: `Object` (error instance)\n\nIt returns an instance of error whose `message` is made from its first argument joined with `\\n`, and has an additional `reasons` property, the same value as its first argument.\n\nThe second argument is used as an error constructor.\n\n```javascript\nconst arrayToError = require('array-to-error');\n\nconst error = arrayToError(['foo', 'bar'], TypeError);\nerror.message; //=> 'foo\\nbar'\nerror.reasons; //=> ['foo', 'bar']\nerror.constructor; //=> TypeError\n```\n\n## License\n\nCopyright (c) 2015 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn)\n\nLicensed under [the MIT License](./LICENSE).\n","maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2022-06-13T03:28:53.851Z","created":"2015-10-06T06:22:20.221Z","0.0.2":"2015-10-06T06:22:20.221Z","1.0.0":"2015-10-06T06:42:40.793Z","1.1.0":"2016-06-08T08:30:02.871Z","1.1.1":"2016-06-21T12:26:03.487Z"},"homepage":"https://github.com/shinnn/array-to-error#readme","keywords":["err","error","arr","array","convert","join","concat","concatenate","concatenation","browser"],"repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-error.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"bugs":{"url":"https://github.com/shinnn/array-to-error/issues"},"license":"MIT","readmeFilename":"README.md"}