MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / baseCopy

Function baseCopy

lib/web/jshint.js:3188–3199  ·  view source on GitHub ↗

* Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property names to copy. * @param {Object} [object={}] The object to copy properties to. * @returns {Object} Returns `object`

(source, props, object)

Source from the content-addressed store, hash-verified

3186 * @returns {Object} Returns `object`.
3187 */
3188 function baseCopy(source, props, object) {
3189 object || (object = {});
3190
3191 var index = -1,
3192 length = props.length;
3193
3194 while (++index < length) {
3195 var key = props[index];
3196 object[key] = source[key];
3197 }
3198 return object;
3199 }
3200
3201 /**
3202 * The base implementation of `_.callback` which supports specifying the

Callers 2

runInContextFunction · 0.85
toPlainObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected