|
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 | |
|---|
| 1 | import isObject from './isObject.js';
|
|---|
| 2 | import isArray from './isArray.js';
|
|---|
| 3 | import extend from './extend.js';
|
|---|
| 4 |
|
|---|
| 5 | // Create a (shallow-cloned) duplicate of an object.
|
|---|
| 6 | export 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.