Your IP : 18.119.116.125


Current Path : /opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/node_modules/err-code/
Upload File :
Current File : //opt/alt/alt-nodejs12/root/usr/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;

?>