{"name":"deprecation","version":"2.1.0","description":"Log a deprecation message with stack","types":"src/index.d.ts","scripts":{"build":"pack build","pretest":"npm run -s build","test":"node test.js","semantic-release":"semantic-release"},"keywords":["deprecate","deprecated","deprecation"],"author":{"name":"Gregor Martynus"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/gr2m/deprecation.git"},"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":"^15.13.3"},"dependencies":{},"@pika/pack":{"pipeline":[["@pika/plugin-standard-pkg"],["@pika/plugin-build-node"],["@pika/plugin-build-web"],["@pika/plugin-build-types"]]},"gitHead":"15c0d6dee8bdba9364f80623c4c333c9ee09eb8b","bugs":{"url":"https://github.com/gr2m/deprecation/issues"},"homepage":"https://github.com/gr2m/deprecation#readme","_id":"deprecation@2.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.16.0","_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"dist":{"integrity":"sha512-H4hTFxRoygYsakNke2TbXhf07lQ2sPqDUxVjjcbDLbfdoiEVhLYS+l0/h7dVACukYQk0nhsTKx1wVRI18WWhFw==","shasum":"3c7d3e40da3a1f1bea49ac00248bab5b496f546e","tarball":"http://registry-npm.ywwl.com/deprecation/download/deprecation-2.1.0.tgz","fileCount":7,"unpackedSize":4745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAeptCRA9TVsSAnZWagAAalIP/ifuOvHRxBwjoQ/v2cjw\n8PWgoozXFPQtchQvKlmp/0ZQcc2XEebW1aaVlN6e+FC4Z7TbQyvgAYrBkYoH\nlOBnmgLOeS2OiZlfl4BaC20r9vZxEkYZ8sFxmKdpGvYxhPZbVBi+FW3ofwNd\ntVaXbnic4RvrFF8jraVFfFDxWzKQWoUdI89CEvuCChHW8A7wSmYiQn4eKatY\nNYSzUs+dpxSTZi5C6Y3Rwl8dD3laHDfhhwyHL569pq7E8RXWpEAA0ja42gaE\n+WXvAPm08vHh14g/tvylery/5nqjPW9xo/O5N2ca8yoUeMJ+eJe0MbRxi4Fq\nCd5B+iSieY7QWEKWBBuMGP61XYx551WZl0btq3Nd+2EF2EYsBn3k5emcAD8E\n+6I1N20yvB4WP5kGvL5xsKC/qaAnc3R5XG/UmUH8ZdzKOHMVvXXMa/p/01Xd\n9VWvo7iCu/MPMt9P6N2RsgXI1oNSby1IetRIB7OnDc140Oq31JDTq+8iSoBk\n/IPNBi+gJN6CA7s61vWTyz/IQprGEDG0zm6hrmZZZjVhpGsjGjNKA2ArFn8C\nKXhhB6i2WSbiN3V7FNnZWevlu+2GCP4Iubs0z+tGMzqaGd7sJQXz8FfWcNPl\n16sMYm01XaK4r6ONJmnfpgygvIkXNARbum+ZLS9huaZHDbUMgsJ1ko0H2kfh\nDm5O\r\n=RLWU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHA+d+tLKHsFfY0+K02PBhacUqAmlO8ukABoiw+bVBBDAiAzqI1ZEBIC7du52X26d7MNXsj2Yz3AlskOdjsM4F1XAw=="}],"size":2207,"noattachment":false,"key":"/deprecation/-/deprecation-2.1.0.tgz"},"maintainers":[{"name":"gr2m","email":"gregor@martynus.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deprecation_2.1.0_1560406636495_0.31508048425630397"},"_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":1560406636587,"_cnpm_publish_time":1560406636587,"dist-tags":{"latest":"2.3.1"}}