{"name":"domexception","description":"An implementation of the DOMException class from browsers","keywords":["dom","webidl","web idl","domexception","error","exception"],"version":"2.0.0","author":{"name":"Domenic Denicola","email":"d@domenic.me","url":"https://domenic.me/"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jsdom/domexception.git"},"main":"index.js","scripts":{"prepare":"node scripts/generate.js","init-wpt":"node scripts/get-latest-platform-tests.js","pretest":"npm run prepare && npm run init-wpt","test":"mocha","lint":"eslint lib"},"dependencies":{"webidl-conversions":"^4.0.2"},"devDependencies":{"eslint":"^6.7.2","mkdirp":"^0.5.1","mocha":"^6.2.2","request":"^2.88.0","webidl2js":"^11.0.0"},"engines":{"node":">=8"},"gitHead":"696792281e474a68cc8fcb4db13dec4ca8a0762f","bugs":{"url":"https://github.com/jsdom/domexception/issues"},"homepage":"https://github.com/jsdom/domexception#readme","_id":"domexception@2.0.0","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-OVnz+UpkJ8zN7pDNROCfluq6mfq9stIRNqNGps7X6GSzjTqQPKmAxANDbQrFTQSmvHKavwCm/nTT2yXtNqAPZw==","shasum":"914a1dcfa9a9ae57cfe7223372f57b25861cc07c","tarball":"http://registry-npm.ywwl.com/domexception/download/domexception-2.0.0.tgz","fileCount":9,"unpackedSize":15290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6+7/CRA9TVsSAnZWagAAWs8QAI2qCP/Adig9YgP1n42T\nUCGO11C5LDamfHB8HvhIpecFWSpbOyNA/3ORUw0/lTxF76LtceKsHKEeWytz\nRhS0l9vOjL42RkrSdA29r/9lldUOTi4qNPi34kZl8lfWVdS+V6/YfbZibhAt\nOupju75D3EopRVH7LoRLj9xhxDGBF+qoYozEEHEyJi3ZTnsZIr4+p5c/cD2u\nLwbEPE/L5l7B3kqK9bOePqjbcVH4RM5H2uJJkc9BtMiFAc55RKe2q9Xxd4d4\njkr9igoPWp2HT5gd2CXG1KEcrQ4u5eRA0dwuMI4jv8z3CSQU1yf1ADIlvqOu\nTo4MpEKw/zVHCdyoW4y0mORT9R5P24bwO7MZRY19QeH58iTCVVo+vMPSwyj0\nmL2aJDMXgKit7tvPsNk8yofVgHl1undZ93yH3QuWYOUU6pFPtPbcJqj20r7W\njvFc/5Cpz8WEWC+n73mQyOHznH9Tu9pFcE6DO6lbihIYS+3Jv66zlOuWAR0p\n2OUAuT7nUA8run5u4ENj7CJzdFYwcklmW03SIlyVJBkkzwQU9lbIInf9F2cQ\n75mABFMnZzlT4A5eIdm7VX6QcqN0MvHYcjZdEy5iud9OKzk0VTL3aymCLz9+\naXEEwQ4Ei6L8vssysmScxTlA6E0eFkiynHKLvu/2juOsVr7ItXhtFTiX9ePF\nck3s\r\n=DUTm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDH6Xtbq5W1Kh3zTPb0p/Vq8WK/poZ894LgiP6DKKTICAIhAIdVLcT27ju4gkHiB36ktAkaT7fefuUwJ+t9uS9ASIXD"}],"size":4696,"noattachment":false,"key":"/domexception/-/domexception-2.0.0.tgz"},"maintainers":[{"email":"d@domenic.me","name":"domenic"},{"email":"joris@jorisvanderwel.com","name":"joris-van-der-wel"},{"email":"sebmaster16@gmail.com","name":"sebmaster"},{"email":"timothygu99@gmail.com","name":"timothygu"},{"email":"tmpvar@gmail.com","name":"tmpvar"},{"email":"code@zirro.se","name":"zirro"}],"_npmUser":{"name":"domenic","email":"d@domenic.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/domexception_2.0.0_1575743231412_0.4986577227494411"},"_hasShrinkwrap":false,"deprecated":"Use your platform's native DOMException instead","readme":"# DOMException\n\nThis package implements the [`DOMException`](https://heycam.github.io/webidl/#idl-DOMException) class, from web browsers. It exists in service of [jsdom](https://github.com/jsdom/jsdom) and related packages.\n\nExample usage:\n\n```js\nconst DOMException = require(\"domexception\");\n\nconst e1 = new DOMException(\"Something went wrong\", \"BadThingsError\");\nconsole.assert(e1.name === \"BadThingsError\");\nconsole.assert(e1.code === 0);\n\nconst e2 = new DOMException(\"Another exciting error message\", \"NoModificationAllowedError\");\nconsole.assert(e2.name === \"NoModificationAllowedError\");\nconsole.assert(e2.code === 7);\n\nconsole.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10);\n```\n\n## APIs\n\nThis package exposes two flavors of the `DOMException` interface depending on the imported module.\n\n### `domexception` module\n\nThis module default-exports the `DOMException` interface constructor.\n\n### `domexception/webidl2js-wrapper` module\n\nThis module exports the `DOMException` [interface wrapper API](https://github.com/jsdom/webidl2js#for-interfaces) generated by [webidl2js](https://github.com/jsdom/webidl2js).\n","publish_time":1575743231550,"_cnpm_publish_time":1575743231550,"dist-tags":{"latest":"4.0.0"}}