{"name":"deprecation","version":"2.0.0","description":"Log a deprecation message with stack","main":"index.js","types":"index.d.ts","scripts":{"test":"node test.js"},"keywords":["deprecate","deprecated","deprecation"],"author":{"name":"Gregor Martynus"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/gr2m/deprecation.git"},"devDependencies":{"semantic-release":"^15.13.3"},"gitHead":"09cc6c56b762a84c2a67618f9f6e7e29bb7eb6ff","bugs":{"url":"https://github.com/gr2m/deprecation/issues"},"homepage":"https://github.com/gr2m/deprecation#readme","_id":"deprecation@2.0.0","_npmVersion":"6.5.0","_nodeVersion":"10.15.3","_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"dist":{"integrity":"sha512-lbQN037mB3VfA2JFuguM5GCJ+zPinMeCrFe+AfSZ6eqrnJA/Fs+EYMnd6Nb2mn9lf2jO9xwEd9o9lic+D4vkcw==","shasum":"dd0427cd920c78bc575ec39dab2f22e7c304fb9d","tarball":"http://registry-npm.ywwl.com/deprecation/download/deprecation-2.0.0.tgz","fileCount":7,"unpackedSize":3727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2z/1CRA9TVsSAnZWagAASzQP/2YahzfsqVkDfZCYT7Mk\nxz9jF1lcCUdGN7CUNuPGLc5k3H1A46LxRqHsUABqsE1r/DlvsVT8HyljN1sS\nCAJoXoJUN2R6p2TbXFw6p+IoCB7bduNorUfzuqwkwe3bFBM6clJdN2IIgw/T\nLgRddgJj4q0FuVFdIzOtY/0UEMIEbQRnsiLDYpSqemiMhWD/ZvoLvcQRL/cg\np9VxzsgYaU9hVqKru0xdfW25nb/6YRghqnxO8DBOBIpzAuZj5V8erA9UqEvP\nEFSbJaT6x0IdZ0pUwkGq5nsiryodHkAMvdM2QwqGp8SuKizL4tpnBV/qBUH/\nzmtGYg3mK/yhrdrKVd3KtNM3nyLuXGLwnyQ2M1HGOcBXXX8S2DqejcAVTTX+\nGK/nNmx0da58zAoFmiGowGD4SAAxseQL4NTkf/V4tcMoOg+uCfK7j2/5uwjz\nZ7tqOZGpTlpav/lkBdDZ31nk7Y7hVzHcxeqbuzzEmirCjVBMD+VKv20H4ZIa\nXru1Wt0MK9IH+WM8YVShz6r0o53wqMI9eIZDnL7uBCfTE672aOuSvQ0Nwm8t\n5wQ6UHEP/QFlWYFwv3RZgQYtP8OwahGJaxueH59DYVjfp+OnUR85fyAbZWfq\nWVWxD3bV97ZRlzy0lEQAgvAISbPtR46s2vZH6c+OdBWf7/Re58A/86I4Ei1N\nFtoe\r\n=B/KJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMgxFzpmgjEg9Urum5Smlxwm68E3h/QPsg6clKHtP4rwIgahZQ0lTtCrlPDaIlN3+1ONIkO+poEMTGF5svEJArNIk="}],"size":1850,"noattachment":false,"key":"/deprecation/-/deprecation-2.0.0.tgz"},"maintainers":[{"name":"gr2m","email":"gregor@martynus.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deprecation_2.0.0_1557872628562_0.003851486126736914"},"_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":1557872628697,"_cnpm_publish_time":1557872628697,"dist-tags":{"latest":"2.3.1"}}