dougwilson / nodejs-depd

Deprecate all the things
MIT License
327 stars 87 forks source link

Convenience function wrapper #1

Closed dougwilson closed 10 years ago

dougwilson commented 10 years ago

Add a convenience method to created a wrapped function that just deprecates all calls to the function (needs to preserve function arity). Possible interface:

var deprecate = requrie('depd')('my-cool-module')

exports.oldfunction = deprecate.function(oldfunction, 'oldfunction')

function oldfunction() {}