{"_id":"deserialize-error","_rev":"5-c87ac7b723b77a5cc167d7004fa93ff4","name":"deserialize-error","description":"convert Plain Object to Error Object","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"deserialize-error","version":"0.0.1","description":"convert Plain Object to Error Object","main":"index.js","scripts":{"build":"babel src/ --out-dir lib/ --minified --source-maps inline","mocha":"mocha 'test/*.js' -r babel-polyfill --compilers js:babel-register","standard":"standard","test":"npm run mocha && npm run standard"},"keywords":["error","deserialize","serialize"],"author":{"name":"Sho Hashimoto","email":"hashimoto@shokai.org"},"license":"MIT","devDependencies":{"babel-cli":"^6.14.0","babel-polyfill":"^6.13.0","babel-preset-es2015":"^6.14.0","babel-register":"^6.14.0","chai":"^3.5.0","mocha":"^3.0.2","serialize-error":"^2.0.0","standard":"^8.0.0"},"gitHead":"b9ebaf520e669b56fcc3b07aa750a29833a6c52b","_id":"deserialize-error@0.0.1","_shasum":"3f8e66eded71a038f45eaf8f16088bd32749785e","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"shokai","email":"hashimoto@shokai.org"},"maintainers":[{"name":"shokai","email":"hashimoto@shokai.org"}],"dist":{"shasum":"3f8e66eded71a038f45eaf8f16088bd32749785e","tarball":"https://registry.npmjs.org/deserialize-error/-/deserialize-error-0.0.1.tgz","integrity":"sha512-bI+RXKPQbze104F5DnpctS4/siIzHbjnAqdZZsGJrPqIMsUiDfwndljfgQozRgivCjdXqaDWiVCtYV4pMaHNmw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8iEIufE1hbCemlE3gkJDfNjXJl9y9zSlX8x4o4AmS3AIhANLWaoZ2jwUEEhOXz1Ao5ginN+brIaUe3qHOcj4f14c4"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/deserialize-error-0.0.1.tgz_1473500496958_0.9166516188997775"}},"0.0.2":{"name":"deserialize-error","version":"0.0.2","description":"convert Plain Object to Error Object","main":"index.js","scripts":{"build":"babel src/ --out-dir lib/ --minified --source-maps inline","mocha":"mocha 'test/*.js' -r babel-polyfill --compilers js:babel-register","standard":"standard","test":"npm run mocha && npm run standard"},"keywords":["error","deserialize","serialize"],"author":{"name":"Sho Hashimoto","email":"hashimoto@shokai.org"},"license":"MIT","devDependencies":{"babel-cli":"^6.14.0","babel-polyfill":"^6.13.0","babel-preset-es2015":"^6.14.0","babel-register":"^6.14.0","chai":"^3.5.0","mocha":"^3.0.2","serialize-error":"^2.0.0","standard":"^8.0.0"},"gitHead":"9087eaf43dc6ad3dfe36755487a03ea0a456af22","_id":"deserialize-error@0.0.2","_shasum":"03af1e8a91d8dc1fda720077929bbc3e5d6220e6","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"shokai","email":"hashimoto@shokai.org"},"maintainers":[{"name":"shokai","email":"hashimoto@shokai.org"}],"dist":{"shasum":"03af1e8a91d8dc1fda720077929bbc3e5d6220e6","tarball":"https://registry.npmjs.org/deserialize-error/-/deserialize-error-0.0.2.tgz","integrity":"sha512-hnaxXp6yM3o9i2aIs9QZdKRq5xRu5GPyPXgzRb0G3bmpRvSFhoI2NGG1z3S/RUM5VsH23tRYKTJjpWhHn5rhLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD09IBrjy6WzT0MUxU7Gj3ifuKFl8POhP5qbHExeu+W8wIgda7vmg6gJM31KLxkoXK923tamJRcHy0LqBWQTPDprGw="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/deserialize-error-0.0.2.tgz_1473597276653_0.6684809802100062"}},"0.0.3":{"name":"deserialize-error","version":"0.0.3","description":"convert Plain Object to Error Object","main":"index.js","scripts":{"build":"babel src/ --out-dir lib/ --minified --source-maps inline","mocha":"mocha 'test/*.js' -r babel-polyfill --compilers js:babel-register","standard":"standard","test":"npm run mocha && npm run standard"},"keywords":["error","deserialize","serialize"],"author":{"name":"Sho Hashimoto","email":"hashimoto@shokai.org"},"license":"MIT","devDependencies":{"babel-cli":"^6.14.0","babel-polyfill":"^6.13.0","babel-preset-es2015":"^6.14.0","babel-register":"^6.14.0","chai":"^3.5.0","mocha":"^3.0.2","serialize-error":"^2.0.0","standard":"^8.0.0"},"directories":{"test":"test"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/shokai/deserialize-error.git"},"bugs":{"url":"https://github.com/shokai/deserialize-error/issues"},"homepage":"https://github.com/shokai/deserialize-error#readme","gitHead":"fd271d87a40fbb8d981c07e66b569994dfe786da","_id":"deserialize-error@0.0.3","_shasum":"f568633572d7c2cc46a55a5fc254b6dfce7b3fca","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"shokai","email":"hashimoto@shokai.org"},"maintainers":[{"name":"shokai","email":"hashimoto@shokai.org"}],"dist":{"shasum":"f568633572d7c2cc46a55a5fc254b6dfce7b3fca","tarball":"https://registry.npmjs.org/deserialize-error/-/deserialize-error-0.0.3.tgz","integrity":"sha512-7A4vkqQdEMF31Dfh7JrscGFWXp9B5snn1KkRsfaa63xSlX8A4PAITa3PiVxHDRu9ZZK64DZCilnVqO0AgFs7Cw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWnaROMLGgqkN/9adWZwSHBdnlIqGmx34vHlNHbVtjywIgP6zb6g26dpT+rWsCtf/1S7A6oPJeh7XX/hffx8df440="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/deserialize-error-0.0.3.tgz_1474104495300_0.9898515031673014"}}},"readme":"# deserialize-error\n\nconvert Plain Object to Error Object\n\n- https://github.com/shokai/deserialize-error\n- https://npmjs.com/package/deserialize-error\n\n[![CircleCI](https://circleci.com/gh/shokai/deserialize-error.svg?style=svg)](https://circleci.com/gh/shokai/deserialize-error)\n\n\n## Usage\n\nSerialize Error's name, message and stack-trace with [serialize-error npm](https://www.npmjs.com/package/serialize-error), then deserialize.\n\n```javascript\nimport serializeError from 'serialize-error'\nimport deserializeError from 'deserialize-error'\n\nconst err = new Error('ouch')\nconst obj = serializeError(err)\nconst err2 = deserializeError(obj)\n\nassert.equal(err.name, err2.name)\nassert.equal(err.message, err2.message)\nassert.equal(err.stack, err2.stack)\nassert.equal(err.toString(), err2.toString())\n```\n\n\nIt also works with custom error and json format.\n\n```javascript\nclass ArgumentError extends Error {\n  constructor (message) {\n    super(message)\n    this.name = 'ArgumentError'\n  }\n}\n\nconst err = new ArgumentError('\"name\" should be a string!!')\nconst err2 = deserializeError(\n  JSON.parse(\n    JSON.stringify(\n      serializeError(err)\n    )\n  )\n)\n\nassert.equal(err.name, err2.name)\nassert.equal(err.message, err2.message)\nassert.equal(err.stack, err2.stack)\nassert.equal(err.toString(), err2.toString())\n```\n","maintainers":[{"name":"shokai","email":"hashimoto@shokai.org"}],"time":{"modified":"2022-06-15T01:36:30.478Z","created":"2016-09-10T09:41:37.191Z","0.0.1":"2016-09-10T09:41:37.191Z","0.0.2":"2016-09-11T12:34:39.323Z","0.0.3":"2016-09-17T09:28:16.951Z"},"keywords":["error","deserialize","serialize"],"author":{"name":"Sho Hashimoto","email":"hashimoto@shokai.org"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/shokai/deserialize-error#readme","repository":{"type":"git","url":"git+https://github.com/shokai/deserialize-error.git"},"bugs":{"url":"https://github.com/shokai/deserialize-error/issues"}}