bin/server/sans-server.js
function defineHookRunner(runners, type) {
    if (runners.types.hasOwnProperty(type)) {
        const err = Error('There is already a hook runner defined for this type: ' + type);
        err.code = 'ESHOOK';
        throw err;
    }

    const s = Symbol(type);
    runners.types[type] = s;
    runners.symbols[s] = type;

    return s;
}
function defineHookRunner(runners, type) {
    if (runners.types.hasOwnProperty(type)) {
        const err = Error('There is already a hook runner defined for this type: ' + type);
        err.code = 'ESHOOK';
        throw err;
    }

    const s = Symbol(type);
    runners.types[type] = s;
    runners.symbols[s] = type;

    return s;
}
function defineHookRunner ( runners , type ) { if ( runners . types . hasOwnProperty ( type ) ) { const err = Error ( 'There is already a hook runner defined for this type: ' + type ) ; err . code = 'ESHOOK' ; throw err ; } const s = Symbol ( type ) ; runners . types [ type ] = s ; runners . symbols [ s ] = type ; return s ; }
Define a hook runner by specifying a unique type that can only be executed using the symbol returned.
@param {{types: object, symbols: object}} runners
@param {string} type
@returns {Symbol}
Define a hook runner by specifying a unique type that can only be executed using the symbol returned .