PHP 7.4.33
Preview: clone.js Size: 454 B
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/css-tree/lib/utils/clone.js
import { List } from './List.js';

export function clone(node) {
    const result = {};

    for (const key in node) {
        let value = node[key];

        if (value) {
            if (Array.isArray(value) || value instanceof List) {
                value = value.map(clone);
            } else if (value.constructor === Object) {
                value = clone(value);
            }
        }

        result[key] = value;
    }

    return result;
}

Directory Contents

Dirs: 0 × Files: 8
Name Size Perms Modified Actions
454 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
477 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.32 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
192 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
12.50 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
2.87 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.10 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.15 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).