dougwilson / nodejs-depd

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

Convenience property wrapper #2

Closed dougwilson closed 10 years ago

dougwilson commented 10 years ago

Add a convenience method to created a wrapped property that just deprecates all calls to the property. Possible interface:

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

var obj = {
  thing: true
}

deprecate.property(obj, 'thing', 'oldobj.thing')

exports.oldobj= obj