Socket
Book a DemoInstallSign in
Socket

deprecated

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deprecated

Tool for deprecating things

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
120K
9.08%
Maintainers
2
Weekly downloads
 
Created
Source

deprecated NPM version Build Status Coveralls Status Dependency Status

Information

Packagedeprecated
DescriptionTool for deprecating things
Node Version>= 0.9

Usage

var oldfn = function(a,b) {
  return a+b;
};

// returns a new wrapper function that logs the deprecated function once
var somefn = deprecated.method('dont use this anymore', console.log, oldfn);

var someobj = {};

// set up a getter/set for field that logs deprecated message once
deprecated.field('dont use this anymore', console.log, someobj, 'a', 123);

console.log(someobj.a); // 123

FAQs

Package last updated on 13 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts