Permalink
Browse files

Deprecate process.mixin, printing a warning to stderr and adding a TO…

…DO comment to remove it.
  • Loading branch information...
1 parent 09a76a5 commit 5e82d5a44cb95ff4e326f64ff57b1b36b243d108 @isaacs committed Mar 8, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/node.js
View
8 src/node.js
@@ -99,7 +99,15 @@ process.assert = function (x, msg) {
// Dual licensed under the MIT and GPL licenses.
// http://docs.jquery.com/License
// Modified for node.js (formely for copying properties correctly)
+// v0.1.32 Marked for deprecation.
+// TODO: Remove this asap (v0.1.33 or later)
process.mixin = function() {
+ // since this function recurses, warning repeatedly would be a bit much.
+ if (arguments.callee.caller !== arguments.callee) {
+ process.stdio.writeError(
+ "process.mixin is deprecated and will go away soon. Please update your code\n");
+ }
+
// copy reference to target object
var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, source;

0 comments on commit 5e82d5a

Please sign in to comment.