deprecated
Tool for deprecating things
Last updated 10 years ago by contra .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install deprecated 
SYNC missed versions from official npm registry.

deprecated NPM version Build Status Coveralls Status Dependency Status

Information

Packagedeprecated
Description Tool 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

Current Tags

  • 0.0.2                                ...           latest (10 years ago)

2 Versions

  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           13 years ago
Maintainers (2)
Downloads
Total 26
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 2
Last Month 13
Dependencies (0)
None
Dev Dependencies (7)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE