mirror of
https://github.com/stCarolas/setup-maven.git
synced 2024-11-27 05:36:09 +08:00
12 lines
286 B
JavaScript
12 lines
286 B
JavaScript
define(['./isObject', './isArray', './extend'], function (isObject, isArray, extend) {
|
|
|
|
// Create a (shallow-cloned) duplicate of an object.
|
|
function clone(obj) {
|
|
if (!isObject(obj)) return obj;
|
|
return isArray(obj) ? obj.slice() : extend({}, obj);
|
|
}
|
|
|
|
return clone;
|
|
|
|
});
|