Permalink
Browse files

Ensure patch complies with style guidelines.

Columns in src/node.js are now less than 80.

Signed-off-by: Tim Smart <tim@fostle.com>
  • Loading branch information...
1 parent 85c38c4 commit e4af3e93cad897753ba4fad14733eee7e03dee4c @tim-smart tim-smart committed Jan 30, 2012
Showing with 17 additions and 13 deletions.
  1. +17 −13 src/node.js
View
@@ -574,23 +574,27 @@
var self = this;
var warned = false;
- Object.defineProperty(this.exports, method, {
- enumerable: false,
- value: function() {
- if (!warned) {
- warned = true;
-
- message = self.id + '.' + method + ' is deprecated. ' + (message || '');
+ function deprecateWrapper () {
+ if (!warned) {
+ warned = true;
- if ((new RegExp('\\b' + self.id + '\\b')).test(process.env.NODE_DEBUG))
- console.trace(message);
- else
- console.error(message);
+ message = self.id + '.' + method + ' is deprecated. '+ (message || '');
- self.exports[method] = original;
+ if ((new RegExp('\\b' + self.id + '\\b')).test(process.env.NODE_DEBUG)) {
+ console.trace(message);
+ } else {
+ console.error(message);
}
- return original.apply(this, arguments);
+
+ self.exports[method] = original;
}
+
+ return original.apply(this, arguments);
+ }
+
+ Object.defineProperty(this.exports, method, {
+ enumerable: false,
+ value: deprecateWrapper
});
};

0 comments on commit e4af3e9

Please sign in to comment.