source: frontend/node_modules/underscore/modules/clone.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 290 bytes
Line 
1import isObject from './isObject.js';
2import isArray from './isArray.js';
3import extend from './extend.js';
4
5// Create a (shallow-cloned) duplicate of an object.
6export default function clone(obj) {
7 if (!isObject(obj)) return obj;
8 return isArray(obj) ? obj.slice() : extend({}, obj);
9}
Note: See TracBrowser for help on using the repository browser.