Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80677 views
1
/**
2
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
3
* Build: `lodash modern modularize exports="npm" -o ./`
4
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
5
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
6
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
7
* Available under MIT license <https://lodash.com/license>
8
*/
9
10
/**
11
* Copies properties of `source` to `object`.
12
*
13
* @private
14
* @param {Object} source The object to copy properties from.
15
* @param {Array} props The property names to copy.
16
* @param {Object} [object={}] The object to copy properties to.
17
* @returns {Object} Returns `object`.
18
*/
19
function baseCopy(source, props, object) {
20
object || (object = {});
21
22
var index = -1,
23
length = props.length;
24
25
while (++index < length) {
26
var key = props[index];
27
object[key] = source[key];
28
}
29
return object;
30
}
31
32
module.exports = baseCopy;
33
34