{"name":"deprecation","description":"Log a deprecation message with stack","version":"2.3.1","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":"^15.13.3"},"bugs":{"url":"https://github.com/gr2m/deprecation/issues"},"homepage":"https://github.com/gr2m/deprecation#readme","_id":"deprecation@2.3.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==","shasum":"6368cbdb40abf3373b525ac87e4a260c3a700919","tarball":"http://registry-npm.ywwl.com/deprecation/download/deprecation-2.3.1.tgz","fileCount":7,"unpackedSize":4006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAovYCRA9TVsSAnZWagAAc5UP/jV+z0IDgArWzFv/fcXI\nEp6ENCVy/thIH97JsL4MJO3VBlpM9gla3tRJIF9lJuo6bwTNllTbmIdU+iGk\nkW1BuFbFHfYQ/cQiFtTj53zF9dEZqlRBz4TpIRdf4Yzn/kbgBFX/UkJI4fzo\nX7I99F4eS3gVMKfdICiQ7Y393km/jILgc3HQoAYjiCMRvvd2hLoe4fItu5PH\nNX/lW+3ngpk+itOWQbdHNWt/28jofrfA+V0PhkLrhXAQzyE7E/a8PlP0KC/k\nft/h5RjmyZlyq6CDZlC6dulTiSm9wvZ1sQLTCFDrN0nyb/cgWNpiuv4dOOSA\nYRngD/+jsZhC1fljW31hAc3AOamsospHbjnOjUEJqtZAwhPKTtYaNh/mRaS4\noC63N7TAlYE5/qo1ROOMbTS2VD7Wzr5rXFupgfAUpeu4fd5IQxk+Xc+CGq8R\npZ0COUQBqlJc6aSTumEHcziA4e8JB6jVszKqbz1KoD5dXRACGULQhhOUmgW3\ndGNKAYtCk9LdRmCQtbxJt2TrQuOgmcC8PsZtSgW+2Q7J1IHLonEpTIPH038f\nxWuolEasr/h1d2R0Qp9IU6dym0/3D27lb/RvuOMjJszDwYod6RM+PlOG8i+N\n9mH3hSxApW1twWJJjh1HddpNpGbNwAqEmTeWBJpsTx6JJT1q6RKfbb8v7j+x\n+xmz\r\n=TNxn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA92Q4GE82I6uVrDzAW3vQunEW/6GG+g5pbWuZ0W+jVJAiEAnYA1rnYYQloKmR+Zqjb0Gt77tW6HB+ziscoJwETFW48="}],"size":1867,"noattachment":false,"key":"/deprecation/-/deprecation-2.3.1.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.1_1560447959272_0.7006460691001619"},"_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":1560447959689,"_cnpm_publish_time":1560447959689,"dist-tags":{"latest":"2.3.1"}}