{"name":"deprecation","description":"Log a deprecation message with stack","version":"2.2.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.2.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0hKRkeK2mInoq8b88l6ZkIaql9NNVehfExtU0MSpSu6qaWaNxxKKQewxAgVT7XfXYaxmsrimfGSGXBfOlRucjA==","shasum":"6445d064cadfeec53d45ab8d0eba66be03d58455","tarball":"http://registry-npm.ywwl.com/deprecation/download/deprecation-2.2.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\nwsFcBAEBCAAQBQJdAfn5CRA9TVsSAnZWagAAoPgP+gK1iuU0YwCIrv9Uj8U8\nVDq33O9H395DUuubiFdyws3mMWAHkKKheAhro+ZurXuSSMeOBbceFdBjfKy3\ntvIAGJO3jvjmoH30NFvV10S4kQw3c2ZLkUGYEVAFxOTx8QqWmjaVtVtGuI0I\nbgl/yWQAk4/POxwgEBTq8wyzrCxLTBfJqG3YVbfUQjQN6x8bftrtMjdrMar4\nsMGp6UKQQYNcJ9L11kXdYN2VttRApeDOUdwTzeBgqqyflgWJP1xewEZCGPFO\nEgrCyK2Ric3xfhoTc3NyFNGmk4G/O+z2zkQfCcumwtVV7utjAQ/5ciDOLrxz\nARkhCI15DYDMSS5DvGgBsCMtVgAFu/Sw3NvdhlGzAU1gMWI3sjBnuEodjitX\ntAGvWcWITEPpZ681H8Irt5bX0S0zjuUOKFDs3Ou6eOOYgzhFR14cI8reLvFg\n6Uf9EHgR/hob8298nP8bAQtuyV80/K0BOugOjfzt4ncoQo6bv9tTE+pKaW06\n54YgDIng3xjyLVodI/7BZ2w9l8zqBGbARCT/11DUt3falRL5x+v1pM3ulngg\nkrUwI+y+1w65ubl55OSUTKzCDAtUT9HLdoLv672jU77RXrgXcgUlslHCDeoE\nVj66TDv8BxBLyf9TLv4dx3a0IQhsGavxOfv5BSeKYcoC1Q1Zm+/StUymIIlr\nZBGK\r\n=udEK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUiAAEN5dAWTkII1BIsAYFz6Zp5kzxyx74he5ACngdXwIhAPbIrsU9uxQ7mq3T43XAh18zDOiKm+7xkSH2WL+eYCTU"}],"size":1879,"noattachment":false,"key":"/deprecation/-/deprecation-2.2.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.2.0_1560410617060_0.6462803196386204"},"_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":1560410617179,"_cnpm_publish_time":1560410617179,"dist-tags":{"latest":"2.3.1"}}