Created
November 17, 2014 23:20
-
-
Save boertel/d7735c780d87b4a9333b to your computer and use it in GitHub Desktop.
Python Decorator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _ = require('lodash'); | |
| function deprecated () { | |
| var args = Array.prototype.slice.call(arguments), | |
| func = args.shift(); | |
| console.log('[Deprecated] ' + func.name) | |
| return func.apply(func, args); | |
| } | |
| var myFunction = _.wrap(myFunction, deprecated); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment