{"name":"deprecation","description":"Log a deprecation message with stack","version":"2.3.0","license":"ISC","esnext":"dist-src/index.js","main":"dist-node/index.js","module":"dist-web/index.js","types":"dist-types/index.d.ts","pika":true,"sideEffects":false,"keywords":["deprecate","deprecated","deprecation"],"repository":{"type":"git","url":"git+https://github.com/gr2m/deprecation.git"},"dependencies":{},"devDependencies":{"@pika/pack":"^0.3.7","@pika/plugin-build-node":"^0.4.0","@pika/plugin-build-types":"^0.4.0","@pika/plugin-build-web":"^0.4.0","@pika/plugin-standard-pkg":"^0.4.0","semantic-release":"github:semantic-release/semantic-release#gr2m-actions-test"},"bugs":{"url":"https://github.com/gr2m/deprecation/issues"},"homepage":"https://github.com/gr2m/deprecation#readme","_id":"deprecation@2.3.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XkLgHkoeWhfPyUv3V1ocE1UGSulHHdFz+uDNUgaOp345+urSFNL7ylsSZnH0gIxWCRoOV0WiniGkSSvTqZmsKQ==","shasum":"a828f8e6a1105b70b5a8f971a3d057cbfde890cb","tarball":"http://registry-npm.ywwl.com/deprecation/download/deprecation-2.3.0.tgz","fileCount":7,"unpackedSize":4056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAfpnCRA9TVsSAnZWagAAg7EQAIqZ2RsCCMbZZ9nbdJWv\nYstAordmQmxpNCypA/nNHCqcZoz7P73wHLSULqT8F6upgXEtQvceUaiyGdDQ\nb86pZQkIegCRvGdGoFdJwo2uuwLiBHr76FafEIAR6dUXFo0M0kA+xDDOaaSn\nJfHloFRLZPlZR3zoTf7WzXmU/TGINV5Ahx3+/x3PpzKuy/q7wdstv9b49qtM\nA/hr8eg7gVUAAOPM4i02AqzyX53+Iv8twrPnG9JxHNZHLR2I1OPFy/3c+Yra\nchZGH+IDrltr5lckM/prsiSIIYDKsWl5EIJvAdqKNtgt9sLk8H/qp3ag4B8K\nAhCglrUdJbXOPVoil7LKmBZT4cN8wm6ANEEVyjGWFfewZl6oGGhIBvwwrUST\nDNJK0nBZPCDfIi1suVij7d7YqEFlt6+9H4aYafnep+ne0iRDUKJXUBrp0KHc\n6Roixli8lRi/agyc6HwlNG1YP2yJbi/znSffglTk2YVkeoYsr4MoORegG/Vt\nC4onFZkYo/99NKwml/+UcjK0qH751H2rT4D7KlPJN6+iztZnA40qegR8k8E/\n3QoLNubAtlzoYayOaafcNDYvz3DDwJY/mcGRXWnpqGcAbCiZPvFwM8Bwma/H\nNLSwLuWcM171zgdYENmaF3cTOFduSy0mGcnj+dQeGVLqlTyoAblUMvrTzeIz\nbSeo\r\n=P71R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsfz09Qbvc9xExRnbfZ8E3SS+Q2Gz0SHjXCplZVN6yUAIge8WymqzUbCJYGMk2qAljBXijwlDOD2CHpfd1Ml5rExs="}],"size":1879,"noattachment":false,"key":"/deprecation/-/deprecation-2.3.0.tgz"},"maintainers":[{"name":"gr2m","email":"gregor@martynus.net"}],"_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deprecation_2.3.0_1560410726450_0.6162189951414576"},"_hasShrinkwrap":false,"readme":"# deprecation\n\n> Log a deprecation message with stack\n\n![build](https://action-badges.now.sh/gr2m/deprecation)\n\n## Usage\n\n<table>\n<tbody valign=top align=left>\n<tr><th>\nBrowsers\n</th><td width=100%>\n\nLoad `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev)\n\n```html\n<script type=\"module\">\n  import { Deprecation } from \"https://cdn.pika.dev/deprecation/v2\";\n</script>\n```\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with `npm install deprecation`\n\n```js\nconst { Deprecation } = require(\"deprecation\");\n// or: import { Deprecation } from \"deprecation\";\n```\n\n</td></tr>\n</tbody>\n</table>\n\n```js\nfunction foo() {\n  bar();\n}\n\nfunction bar() {\n  baz();\n}\n\nfunction baz() {\n  console.warn(new Deprecation(\"[my-lib] foo() is deprecated, use bar()\"));\n}\n\nfoo();\n// { Deprecation: [my-lib] foo() is deprecated, use bar()\n//     at baz (/path/to/file.js:12:15)\n//     at bar (/path/to/file.js:8:3)\n//     at foo (/path/to/file.js:4:3)\n```\n\nTo log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module.\n\n```js\nconst Deprecation = require(\"deprecation\");\nconst once = require(\"once\");\n\nconst deprecateFoo = once(console.warn);\n\nfunction foo() {\n  deprecateFoo(new Deprecation(\"[my-lib] foo() is deprecated, use bar()\"));\n}\n\nfoo();\nfoo(); // logs nothing\n```\n\n## License\n\n[ISC](LICENSE)\n","publish_time":1560410726555,"_cnpm_publish_time":1560410726555,"dist-tags":{"latest":"2.3.1"}}