Browse Source

Deprecate process.mixin

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
c1613e6ebb
  1. 12
      doc/api.txt
  2. 5
      src/node.js

12
doc/api.txt

@ -158,18 +158,6 @@ information.
Similar to +eval()+ except that you can specify a +scriptOrigin+ for better Similar to +eval()+ except that you can specify a +scriptOrigin+ for better
error reporting and the +code+ cannot see the local scope. error reporting and the +code+ cannot see the local scope.
+process.mixin([deep], target, object1, [objectN])+ ::
Extend one object with one or more others, returning the modified object.
If no target is specified, the +GLOBAL+ namespace itself is extended.
Keep in mind that the target object will be modified, and will be returned
from +process.mixin()+.
+
If a boolean true is specified as the first argument, Node performs a deep
copy, recursively copying any objects it finds. Otherwise, the copy will
share structure with the original object(s).
+
Undefined properties are not copied. However, properties inherited from the
object's prototype will be copied over.
== System module == System module

5
src/node.js

@ -100,7 +100,12 @@ process.assert = function (x, msg) {
// Dual licensed under the MIT and GPL licenses. // Dual licensed under the MIT and GPL licenses.
// http://docs.jquery.com/License // http://docs.jquery.com/License
// Modified for node.js (formely for copying properties correctly) // Modified for node.js (formely for copying properties correctly)
var mixinMessage;
process.mixin = function() { process.mixin = function() {
if (!mixinMessage) {
mixinMessage = 'deprecation warning: process.mixin will be removed from node-core future releases.\n'
process.stdio.writeError(mixinMessage);
}
// copy reference to target object // copy reference to target object
var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, source; var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, source;

Loading…
Cancel
Save