|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
286 bytes
|
| Line | |
|---|
| 1 | define(['./isObject', './isArray', './extend'], function (isObject, isArray, extend) {
|
|---|
| 2 |
|
|---|
| 3 | // Create a (shallow-cloned) duplicate of an object.
|
|---|
| 4 | function clone(obj) {
|
|---|
| 5 | if (!isObject(obj)) return obj;
|
|---|
| 6 | return isArray(obj) ? obj.slice() : extend({}, obj);
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | return clone;
|
|---|
| 10 |
|
|---|
| 11 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.