Sha256: 63ff549c752ba3926a76d08295fd810961090589bb037a73f9ec6296fa5b2c47
Contents?: true
Size: 599 Bytes
Versions: 25
Compression:
Stored size: 599 Bytes
Contents
// Copies a variable number of methods from source to target. d3.rebind = function(target, source) { var i = 1, n = arguments.length, method; while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]); return target; }; // Method is assumed to be a standard D3 getter-setter: // If passed with no arguments, gets the value. // If passed with arguments, sets the value and returns the target. function d3_rebind(target, source, method) { return function() { var value = method.apply(source, arguments); return arguments.length ? target : value; }; }
Version data entries
25 entries across 25 versions & 1 rubygems