Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deprecation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deprecation - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

package.json
{
"name": "deprecation",
"version": "1.0.0",
"version": "1.0.1",
"description": "Log a deprecation message with stack",

@@ -9,5 +9,16 @@ "main": "index.js",

},
"keywords": [],
"keywords": [
"deprecate",
"deprecated",
"deprecation"
],
"author": "Gregor Martynus (https://twitter.com/gr2m",
"license": "ISC"
"license": "ISC",
"repository": {
"type": "git",
"url": "https://github.com/gr2m/deprecation.git"
},
"devDependencies": {
"semantic-release": "^15.13.3"
}
}

@@ -21,3 +21,3 @@ # deprecation

function baz () {
console.log(new Deprecation('[my-lib] foo() is deprecated, use bar()'))
console.warn(new Deprecation('[my-lib] foo() is deprecated, use bar()'))
}

@@ -32,4 +32,20 @@

To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module.
```js
const Deprecation = require('deprecation')
const once = require('once')
const deprecateFoo = once(console.warn)
function foo () {
deprecateFoo(new Deprecation('[my-lib] foo() is deprecated, use bar()'))
}
foo()
foo() // logs nothing
```
## License
[ISC](LICENSE)
gregor.js

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc