{"_id":"ts-error","_rev":"3816901","name":"ts-error","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","dist-tags":{"latest":"1.0.6"},"maintainers":[{"name":"gfmio","email":""}],"time":{"modified":"2025-06-05T11:32:17.000Z","created":"2018-03-19T19:52:01.719Z","1.0.6":"2020-05-14T21:48:54.660Z","1.0.5":"2020-05-14T21:05:49.530Z","1.0.4":"2019-10-20T08:20:26.883Z","1.0.3":"2018-05-21T08:13:36.535Z","1.0.2":"2018-05-21T07:12:10.873Z","1.0.1":"2018-03-20T04:33:43.950Z","1.0.0":"2018-03-19T20:16:57.323Z","0.1.0":"2018-03-19T19:52:01.719Z"},"users":{},"author":{"name":"Frédérique Mittelstaedt","email":"npm@gfm.io","url":"https://www.gfm.io"},"repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"versions":{"1.0.6":{"name":"ts-error","version":"1.0.6","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"npm@gfm.io","url":"https://www.gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/es.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest":"npm run build:test","test:node:cjs":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"./node_modules/.bin/concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"./node_modules/.bin/concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^7.0.2","@types/node":"^14.0.1","awesome-typescript-loader":"^5.2.1","chai":"^4.2.0","concurrently":"^5.2.0","copy-webpack-plugin":"^5.1.1","hard-source-webpack-plugin":"^0.13.1","husky":"^4.2.5","lite-server":"^2.5.4","mocha":"^7.1.2","prettier":"^2.0.5","pretty-quick":"^2.0.1","source-map-loader":"^0.2.4","ts-node":"^8.10.1","tslint":"^6.1.2","typescript":"^3.9.2","webpack":"^4.43.0","webpack-cli":"^3.3.11","xyz":"^4.0.0"},"dependencies":{},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"licenseText":"MIT License\n\nCopyright (c) 2018 Frédérique Mittelstaedt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"ts-error@1.0.6","dist":{"shasum":"277496f2a28de6c184cfce8dfd5cdd03a4e6b0fc","size":7717,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.6.tgz"},"maintainers":[{"name":"gfmio","email":""}],"_npmUser":{"name":"gfmio","email":"npm@gfm.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.6_1589492934497_0.5034124201890338"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:06.859Z","publish_time":1589492934660,"_cnpm_publish_time":1589492934660},"1.0.5":{"name":"ts-error","version":"1.0.5","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"npm@gfm.io","url":"https://www.gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/es.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest":"npm run build:test","test:node:cjs":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"./node_modules/.bin/concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"./node_modules/.bin/concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^7.0.2","@types/node":"^14.0.1","awesome-typescript-loader":"^5.2.1","chai":"^4.2.0","concurrently":"^5.2.0","copy-webpack-plugin":"^5.1.1","hard-source-webpack-plugin":"^0.13.1","husky":"^4.2.5","lite-server":"^2.5.4","mocha":"^7.1.2","prettier":"^2.0.5","pretty-quick":"^2.0.1","source-map-loader":"^0.2.4","ts-node":"^8.10.1","tslint":"^6.1.2","typescript":"^3.9.2","webpack":"^4.43.0","webpack-cli":"^3.3.11","xyz":"^4.0.0"},"dependencies":{},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"licenseText":"MIT License\n\nCopyright (c) 2018 Frédérique Mittelstaedt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"ts-error@1.0.5","dist":{"shasum":"8b9cebeaece333a6382fc2ce478ebd6181b05db0","size":7710,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.5.tgz"},"maintainers":[{"name":"gfmio","email":""}],"_npmUser":{"name":"gfmio","email":"npm@gfm.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.5_1589490349382_0.3849642650697984"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:06.751Z","publish_time":1589490349530,"_cnpm_publish_time":1589490349530},"1.0.4":{"name":"ts-error","version":"1.0.4","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"npm@gfm.io","url":"https://www.gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/es.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"./node_modules/.bin/concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest":"npm run build:test","test:node:cjs":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"./node_modules/.bin/mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"./node_modules/.bin/concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"./node_modules/.bin/concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"./node_modules/.bin/xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.2.3","@types/mocha":"^5.2.7","@types/node":"^12.11.1","awesome-typescript-loader":"^5.2.1","chai":"^4.2.0","concurrently":"^5.0.0","copy-webpack-plugin":"^5.0.4","hard-source-webpack-plugin":"^0.13.1","husky":"^3.0.9","lite-server":"^2.5.4","mocha":"^6.2.2","prettier":"^1.18.2","pretty-quick":"^2.0.0","source-map-loader":"^0.2.4","ts-node":"^8.4.1","tslint":"^5.20.0","typescript":"^3.6.4","webpack":"^4.41.2","webpack-cli":"^3.3.9","xyz":"^3.0.0"},"dependencies":{},"husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"licenseText":"MIT License\n\nCopyright (c) 2018 Frédérique Mittelstaedt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"ts-error@1.0.4","dist":{"shasum":"d76dbeb411f948f616e28713a1132f563c37ec1f","size":7732,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.4.tgz"},"maintainers":[{"name":"gfmio","email":""}],"_npmUser":{"name":"gfmio","email":"npm@gfm.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.4_1571559626724_0.7151548600171118"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:05.654Z","publish_time":1571559626883,"_cnpm_publish_time":1571559626883},"1.0.3":{"name":"ts-error","version":"1.0.3","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"frederique@gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/es.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest":"npm run build:test","test:node:cjs":"mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.7","awesome-typescript-loader":"^4.0.1","chai":"^4.1.2","concurrently":"^3.5.1","copy-webpack-plugin":"^4.5.1","hard-source-webpack-plugin":"^0.6.4","lite-server":"^2.3.0","mocha":"^5.0.4","source-map-loader":"^0.2.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2","webpack":"^3.11.0","xyz":"^3.0.0"},"dependencies":{},"gitHead":"caa46904d32ef32685439beb4d3f69c005c13549","_id":"ts-error@1.0.3","_npmVersion":"5.7.1","_nodeVersion":"9.3.0","_npmUser":{"name":"gfmio","email":"me@gfm.io"},"dist":{"shasum":"18140ba8b1054c9ba1f2dd2c29156f3671d9427a","size":7339,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.3.tgz"},"maintainers":[{"name":"gfmio","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.3_1526890416478_0.7457406610057256"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:04.732Z","publish_time":1526890416535,"_cnpm_publish_time":1526890416535},"1.0.2":{"name":"ts-error","version":"1.0.2","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"frederique@gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/cjs.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest":"npm run build:test","test:node:cjs":"mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.7","awesome-typescript-loader":"^4.0.1","chai":"^4.1.2","concurrently":"^3.5.1","copy-webpack-plugin":"^4.5.1","hard-source-webpack-plugin":"^0.6.4","lite-server":"^2.3.0","mocha":"^5.0.4","source-map-loader":"^0.2.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2","webpack":"^3.11.0","xyz":"^3.0.0"},"dependencies":{},"gitHead":"e67671bf3c274e2e4dce7b3877df957aeabbb6d1","_id":"ts-error@1.0.2","_npmVersion":"5.7.1","_nodeVersion":"9.3.0","_npmUser":{"name":"gfmio","email":"me@gfm.io"},"dist":{"shasum":"aaa9f5eb354b05a3664a8b33c22f1b8635fbf5fc","size":7339,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.2.tgz"},"maintainers":[{"name":"gfmio","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.2_1526886730829_0.10329755123762974"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:03.854Z","publish_time":1526886730873,"_cnpm_publish_time":1526886730873},"1.0.1":{"name":"ts-error","version":"1.0.1","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"frederique@gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/types.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest:create-lib-symlinks":"cd ./lib && rm -f ./cjs.d.ts ./es.d.ts && ln -s ./types.d.ts ./cjs.d.ts && ln -s ./types.d.ts ./es.d.ts","pretest":"npm run pretest:create-lib-symlinks && npm run build:test","test:node:cjs":"mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.7","awesome-typescript-loader":"^4.0.1","chai":"^4.1.2","concurrently":"^3.5.1","copy-webpack-plugin":"^4.5.1","hard-source-webpack-plugin":"^0.6.4","lite-server":"^2.3.0","mocha":"^5.0.4","source-map-loader":"^0.2.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2","webpack":"^3.11.0","xyz":"^3.0.0"},"dependencies":{},"gitHead":"c8716f7eb9ac66620717ec3dfc5309fad491a959","_id":"ts-error@1.0.1","_npmVersion":"5.7.1","_nodeVersion":"9.3.0","_npmUser":{"name":"gfmio","email":"me@gfm.io"},"dist":{"shasum":"5eaa9129e35f268c75f262114a01201cb38dbe32","size":7463,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.1.tgz"},"maintainers":[{"name":"gfmio","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.1_1521520423893_0.3312514213783724"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:02.767Z","publish_time":1521520423950,"_cnpm_publish_time":1521520423950},"1.0.0":{"name":"ts-error","version":"1.0.0","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"frederique@gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/types.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest:create-lib-symlinks":"cd ./lib && rm -f ./cjs.d.ts ./es.d.ts && ln -s ./types.d.ts ./cjs.d.ts && ln -s ./types.d.ts ./es.d.ts","pretest":"npm run pretest:create-lib-symlinks && npm run build:test","test:node:cjs":"mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.7","awesome-typescript-loader":"^4.0.1","chai":"^4.1.2","concurrently":"^3.5.1","copy-webpack-plugin":"^4.5.1","es6-error":"^4.1.1","hard-source-webpack-plugin":"^0.6.4","lite-server":"^2.3.0","mocha":"^5.0.4","source-map-loader":"^0.2.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2","webpack":"^3.11.0","xyz":"^3.0.0"},"dependencies":{},"gitHead":"32d7ebc55efa850ca77e2b5b74e0e66ccabd38cd","_id":"ts-error@1.0.0","_npmVersion":"5.7.1","_nodeVersion":"9.3.0","_npmUser":{"name":"gfmio","email":"me@gfm.io"},"dist":{"shasum":"e07873bb1f862177649fbd4064a4f4d4b3f263ba","size":7471,"noattachment":false,"key":"/ts-error/-/ts-error-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-1.0.0.tgz"},"maintainers":[{"name":"gfmio","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_1.0.0_1521490617256_0.7897817075050166"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:01.906Z","publish_time":1521490617323,"_cnpm_publish_time":1521490617323},"0.1.0":{"name":"ts-error","version":"0.1.0","description":"An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even with the oldest browsers","author":{"name":"Frédérique Mittelstaedt","email":"frederique@gfm.io"},"license":"MIT","main":"./lib/cjs.js","module":"./lib/es.js","browser":"./lib/cjs.js","types":"./lib/types.d.ts","homepage":"https://github.com/gfmio/ts-error#readme","repository":{"type":"git","url":"git+https://github.com/gfmio/ts-error.git"},"bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"keywords":["Error","Extendable","JavaScript","ES6","esnext","TypeScript"],"scripts":{"build:test:browser:es3":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es3:watch":"export TARGET=\"es3\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es5:watch":"export TARGET=\"es5\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:es6:watch":"export TARGET=\"es6\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --config ./tests/build/webpack/webpack.config.js","build:test:browser:esnext:watch":"export TARGET=\"esnext\" && ./node_modules/.bin/webpack --watch --config ./tests/build/webpack/webpack.config.js","build:test:browser":"concurrently \"npm run build:test:browser:es3\" \"npm run build:test:browser:es5\" \"npm run build:test:browser:es6\" \"npm run build:test:browser:esnext\"","build:test:browser:watch":"concurrently \"npm run build:test:browser:es3:watch\" \"npm run build:test:browser:es5:watch\" \"npm run build:test:browser:es6:watch\" \"npm run build:test:browser:esnext:watch\"","build:test":"npm run build:test:browser","build:test:watch":"npm run build:test:browser:watch","pretest:create-lib-symlinks":"cd ./lib && rm -f ./cjs.d.ts ./es.d.ts && ln -s ./types.d.ts ./cjs.d.ts && ln -s ./types.d.ts ./es.d.ts","pretest":"npm run pretest:create-lib-symlinks && npm run build:test","test:node:cjs":"mocha --reporter spec --require ./tests/mocha.tshook.es3.js ./tests/node/cjs.ts","test:node:es":"mocha --reporter spec --require ./tests/mocha.tshook.esnext.js ./tests/node/es.ts","test:node":"npm run test:node:cjs && npm run test:node:es","test:browser":"lite-server -c ./tests/build/lite-server/bs-config.json","test":"npm run test:node && npm run test:browser","watch":"concurrently \"npm run build:test:watch\" \"npm run test:browser\"","clean:node":"rm -rf ./node_modules","clean:test:browser:dist":"rm -rf ./tests/browser/dist","clean":"concurrently \"npm run clean:test:browser:dist\" \"npm run clean:node\"","release-major":"xyz --repo git@github.com:gfmio/ts-error.git --increment major","release-minor":"xyz --repo git@github.com:gfmio/ts-error.git --increment minor","release-patch":"xyz --repo git@github.com:gfmio/ts-error.git --increment patch"},"devDependencies":{"@types/chai":"^4.1.2","@types/mocha":"^2.2.48","@types/node":"^9.4.7","awesome-typescript-loader":"^4.0.1","chai":"^4.1.2","concurrently":"^3.5.1","copy-webpack-plugin":"^4.5.1","es6-error":"^4.1.1","hard-source-webpack-plugin":"^0.6.4","lite-server":"^2.3.0","mocha":"^5.0.4","source-map-loader":"^0.2.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2","webpack":"^3.11.0","xyz":"^3.0.0"},"dependencies":{},"gitHead":"1a1d18d58e1ad9406e4647d314d73b0b277c7579","_id":"ts-error@0.1.0","_npmVersion":"5.7.1","_nodeVersion":"9.3.0","_npmUser":{"name":"gfmio","email":"me@gfm.io"},"dist":{"shasum":"f0c126b98547aa3904f0e46a9e0b55d7007ffc5f","size":6948,"noattachment":false,"key":"/ts-error/-/ts-error-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ts-error/download/ts-error-0.1.0.tgz"},"maintainers":[{"name":"gfmio","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-error_0.1.0_1521489121665_0.47342818470955783"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T18:33:01.003Z","publish_time":1521489121719,"_cnpm_publish_time":1521489121719}},"readme":"# ts-error\n\n**TL/DR: An extendable error class that actually works with TypeScript and ES6\nsupport compatible with all environments, even very old browsers.**\n\nThis package provides an extendable error class, `ExtendableError` for\nJavaScript / TypeScript. There exist a number of similar packages on NPM, but\nthey all have shortcomings, like not supporting TypeScript, being awkward to use\nwith TypeScript 2, not being compatible with old browsers, not printing the\nstack trace when used with `console.log` or similar functions or not having all\nfeatures I wanted. So I decided to write my own.\n\nObviously, it's not all 100% written from scratch, but rather I collected the\ngood parts from various existing open source error packages and some\nStackOverflow answers, fixed various errors, wrote some tests and put it\ntogether in one package.\n\nThe purpose of extendable errors classes is to be able to throw error objects\nthat are subclasses of the built-in JavaScript `Error` class, which has a number\nof gotchas, and to then filter them with the `instanceof` operator in the\n`catch` clause of a `try`/`catch` block as well as potentially adding additional\nvariables to the error object.\n\nThis `ExtendableError` class will:\n\n- subclass the built-in `Error` class. Subclasses created from `ExtendableError`\n  will subclass `Error`, `ExtendableError` and any other classes in the\n  inheritance chain.\n- have a name attribute equal to the class name\n- have a string representation with `toString()` that includes the name and\n  message properties of the error object. This is also fixed for all versions of\n  IE, where the error object usually does _not_ print error objects like this.\n- include all non-standard properties that default `Error` objects provide in\n  different browsers\n- provide a stack trace, if default `Error` objects have the `stack` property or\n  the `Error.captureStackTrace` exists (on V8, so in Chrome and node.js).\n  Additionally, on V8, the stack trace will **not** include the constructor\n  functions of the error subclasses.\n- have a stack trace with the actual error name instead of `Error`\n- display the stack trace (or the toString() representation, if the stack trace\n  does not exist), including the error name at the beginning, when printed with\n  `console.log(e)` (except for Chrome, where this does not work, even though the\n  `stack` property includes the actual name. I don't think it is possible to fix\n  this, but if anyone knows a way, let me know!)\n\nIt is compatible with node.js, provides an old-style CommonJS module and a\nnew-style ES6 module as well as a TypeScript definition file. It is extensively\ntested and works in node.js and all browsers I have tested (including IE6 and\nvarious old browsers as well as mobile browsers).\n\nIt's also really small, with less than 200 lines of code, and it has no\nproduction dependencies.\n\n## Install\n\nYou can install the [ts-error package](https://www.npmjs.com/package/ts-error)\nfrom NPM with the command:\n\n```sh\n# If you use yarn\nyarn add ts-error\n\n# If you use NPM\nnpm install ts-error\n```\n\n## Usage\n\nSimply import the package and optionally subclass `ExtendableError` and create a\nnew error object. The `message` property that should be passed to the object\nwill is optional and will default to an empty string. If undefined is passed,\nthis is also turned into an empty string.\n\nFor compatiblity, the package requires various methods, that are not defined in\nold browsers. The CommonJs version (only!) includes polyfills for these\nfunctions without polluting the global namespace, if the required functions are\nnot defined. If you want to use your own polyfills, load them before loading\nthis package.\n\nIn TypeScript:\n\n```ts\nimport { ExtendableError } from \"ts-error\";\n\nclass CustomError extends ExtendableError {}\n\ntry {\n  throw new CustomError(\"Optional Error message\");\n} catch (e) {\n  if (e instanceof CustomError) {\n    // ...\n  } else {\n    // ...\n  }\n}\n```\n\nIn ES6 / esnext:\n\n```js\nimport { ExtendableError } from \"ts-error\";\n\nclass CustomError extends ExtendableError {}\n\ntry {\n  throw new CustomError(\"Optional Error message\");\n} catch (e) {\n  if (e instanceof CustomError) {\n    // ...\n  } else {\n    // ...\n  }\n}\n```\n\nIn ES5:\n\n```js\nvar ExtendableError = require(\"ts-error\").ExtendableError;\n\n// This is taken from TypeScript compiler output, because it works quite reliably.\n// There are various other methods though, so use whatever you like, if you have to use ES5.\nvar __extends =\n  (this && this.__extends) ||\n  (function() {\n    var extendStatics =\n      Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array &&\n        function(d, b) {\n          d.__proto__ = b;\n        }) ||\n      function(d, b) {\n        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n      };\n    return function(d, b) {\n      extendStatics(d, b);\n      function __() {\n        this.constructor = d;\n      }\n      d.prototype =\n        b === null\n          ? Object.create(b)\n          : ((__.prototype = b.prototype), new __());\n    };\n  })();\n\nvar CustomError = /** @class */ (function(_super) {\n  __extends(CustomError, _super);\n  function CustomError() {\n    return (_super !== null && _super.apply(this, arguments)) || this;\n  }\n  return CustomError;\n})(ExtendableError);\n\ntry {\n  throw new CustomError(\"Optional Error message\");\n} catch (e) {\n  if (e instanceof CustomError) {\n    // ...\n  } else {\n    // ...\n  }\n}\n```\n\n**Please note that error names will not be displayed correctly if the error\nclass definitions get uglified, because the display of error messages relies on\n`Function.prototype.name` to infer the correct error message.** You can\nconfigure any uglifier to ignore certain function or class names, either via a\nsource code annotation or using a regex configuration parameter to decide which\nproperties to mangle.\n\n## Tests\n\nThe module is extensively tested in JavaScript, ES6+ and TypeScript and works in\nnode.js as well as all browsers I have tested: All versions of Chrome 15+,\nFirefox 3+, Safari 4+, Edge 14+, IE6+, Opera 10.6+, Yandex 14.12, various iOS\nbrowsers down to the iPhone 3GS running iOS3 and the Android browser down to\nAndroid 4. Note that I haven't test all versions of these browsers (except for\nIE and Edge due to their notorious buggyness), but rather the oldest few and\nmore recent ones, because I would assume if they work in either of these, they\nwill work in all versions.\n\n**If you encounter any issues, please file an issue and I will investigate and\nfix it.**\n\nYou can run all tests together with `npm run test`, which will build all browser\ntests and then execute the node and browser tests sequentially. All tests are\nwritten in TypeScript and compiled to various targets to ensure compatibility.\nAll build configuration is in `tests/build`.\n\nIf you choose to build and run tests manually / individually, you first need to\nrun `npm run pretest:create-lib-symlinks`, which creates symlinks of the\nTypeScript definition file in the `lib` directory.\n\n### node.js tests\n\nThe node.js tests use `mocha` and `chai` together with `ts-node`. The test\nsource code is in `tests/node`. For node.js testing, the following commands\nexist:\n\n- `npm run test:node:cjs`: Test the CommonJs module `lib/cjs.js` with the\n  compile target ES3.\n- `npm run test:node:es`: Test the ES6+ module `lib/es.js` with the compile\n  target `esnext`.\n- `npm run test:node`: Run the CJS followed by the ES6+ tests.\n\nBrowser testing is a bit more complex. To ensure that the package is compatible\neven with the oldest browsers, I had to create a few helper functions to emulate\nthe required functionality of `mocha` and `chai`. Old browsers like IE do not\nhave a console and various quirks, so it is necessary to execute the tests after\nthe DOM has loaded and write the results to the HTML body.\n\n### Browser tests\n\nYou can build all browser tests with `npm run build:test` as well as in watch\nmode with `npm run build:test:watch`. The test source code is in\n`tests/browser/src`. This will run webpack to compile and bundle the test files\nfor various targets and copy some HTML files. The output will be in\n`tests/browser/dist`, the bundled JS in `tests/browser/dist/js`. You can then\nstart the test with `npm run test:browser`. This will start `lite-server`, serve\nthe compiled files and should open a browser window automatically.\n\nIn the browser, you will see a navigation for testing of the scripts compiled to\ntargets ES3, ES5, ES6 and esnext. For each of these, you will have the option to\nuse print the results in the console or not. If you choose the console option,\nthe results will be printed in the console. If you choose the non-console option\nor a console is not available in your browser, it will append the results to the\nDOM.\n\nIf you would like to build some of the browser tests individually, the following\ncommands are available:\n\n- `npm run build:test:browser:es3`: Build the test files for ES3\n- `npm run build:test:browser:es3:watch`: Build the test files for ES3 in watch\n  mode\n- `npm run build:test:browser:es5`: Build the test files for ES5\n- `npm run build:test:browser:es5:watch`: Build the test files for ES5 in watch\n  mode\n- `npm run build:test:browser:es6`: Build the test files for ES6\n- `npm run build:test:browser:es6:watch`: Build the test files for ES6 in watch\n  mode\n- `npm run build:test:browser:esnext`: Build the test files for esnext\n- `npm run build:test:browser:esnext:watch`: Build the test files for esnext in\n  watch mode\n- `npm run build:test:browser`: Execute all of the build commands concurrently\n- `npm run build:test:browser:watch`: Execute all of the build commands\n  concurrently in watch mode\n- `npm run build:test`: Same as `npm run build:test:browser`\n- `npm run build:test:watch`: Same as `npm run build:test:browser:watch`\n\n## License\n\nMIT (see [./LICENSE](./LICENSE)).\n","_attachments":{},"homepage":"https://github.com/gfmio/ts-error#readme","bugs":{"url":"https://github.com/gfmio/ts-error/issues"},"license":"MIT"}