Socket
Socket
Sign inDemoInstall

deprecatejs

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deprecatejs - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

.eslintrc

24

index.js
'use strict';
var isProduction = false;
var deprecate = function(callback, message) {
if (deprecate.production) {
return callback;
}
if(isProduction) {
return callback;
}
return function deprecateFn() {
console.error('- Deprecation Warning! ' + ( message || ''));
return callback.apply(null, arguments);
};
};
return function deprecateFn () {
console.error('- Deprecation Warning! ' + ( message || ''));
return callback.apply(null, arguments);
};
deprecate.inProduction = function() {
deprecate.production = true;
};
deprecate.inProduction = function () {
isProduction = true;
}
deprecate.production = false;
module.exports = deprecate;
{
"name": "deprecatejs",
"version": "1.0.6",
"version": "1.0.7",
"description": "Wrapper to deprecate JavaScript functions. Displays a custom error message if consumers call a function you've marked as deprecated",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "./node_modules/eslint/bin/eslint.js *.js",
"test": "./node_modules/mocha/bin/_mocha"
},

@@ -21,3 +22,12 @@ "repository": {

},
"homepage": "https://github.com/porchdotcom/deprecatejs#readme"
"homepage": "https://github.com/porchdotcom/deprecatejs#readme",
"devDependencies": {
"babel-eslint": "^4.0.5",
"chai": "^3.2.0",
"eslint": "^0.24.1",
"jasmine": "^2.3.1",
"mocha": "^2.2.5",
"sinon": "^1.15.4",
"sinon-chai": "^2.8.0"
}
}
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