|
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:
544 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 3 | value: true
|
|---|
| 4 | });
|
|---|
| 5 | Object.defineProperty(exports, "cloneDeep", {
|
|---|
| 6 | enumerable: true,
|
|---|
| 7 | get: function() {
|
|---|
| 8 | return cloneDeep;
|
|---|
| 9 | }
|
|---|
| 10 | });
|
|---|
| 11 | function cloneDeep(value) {
|
|---|
| 12 | if (Array.isArray(value)) {
|
|---|
| 13 | return value.map((child)=>cloneDeep(child));
|
|---|
| 14 | }
|
|---|
| 15 | if (typeof value === "object" && value !== null) {
|
|---|
| 16 | return Object.fromEntries(Object.entries(value).map(([k, v])=>[
|
|---|
| 17 | k,
|
|---|
| 18 | cloneDeep(v)
|
|---|
| 19 | ]));
|
|---|
| 20 | }
|
|---|
| 21 | return value;
|
|---|
| 22 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.