PHP 7.4.33
Preview: create-custom-error.cjs Size: 532 B
/var/www/cookieconsent.bitkit.dk/httpdocs/node_modules/css-tree/cjs/utils/create-custom-error.cjs
'use strict';

function createCustomError(name, message) {
    // use Object.create(), because some VMs prevent setting line/column otherwise
    // (iOS Safari 10 even throws an exception)
    const error = Object.create(SyntaxError.prototype);
    const errorStack = new Error();

    return Object.assign(error, {
        name,
        message,
        get stack() {
            return (errorStack.stack || '').replace(/^(.+\n){1,3}/, `${name}: ${message}\n`);
        }
    });
}

exports.createCustomError = createCustomError;

Directory Contents

Dirs: 0 × Files: 8
Name Size Perms Modified Actions
493 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
532 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.44 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
526 B lrw-r--r-- 2025-06-16 05:45:40
Edit Download
12.52 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
2.99 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.21 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
3.29 KB lrw-r--r-- 2025-06-16 05:45:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).