PHP 8.1.33
Preview: index.js Size: 397 B
//lib/node_modules/npm/node_modules/err-code/index.js

'use strict';

function createError(msg, code, props) {
    var err = msg instanceof Error ? msg : new Error(msg);
    var key;

    if (typeof code === 'object') {
        props = code;
    } else if (code != null) {
        err.code = code;
    }

    if (props) {
        for (key in props) {
            err[key] = props[key];
        }
    }

    return err;
}

module.exports = createError;

Directory Contents

Dirs: 0 × Files: 9

Name Size Perms Modified Actions
179 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
127 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
25 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
54 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
589 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
397 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.24 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.65 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
2.30 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).