lib/config-parser.js
function parseNode(attrNode, parsers, context) {
    const attrNames = Object.keys(attrNode);
    const errorContext = context.errorContext;

    Object.keys(parsers).forEach(attrName => {
        const parser = parsers[attrName];

        context.errorContext = ` (option "${attrName}"${errorContext})`;
        removeValue(attrNames, attrName);

        if (attrName in attrNode && parser !== null) {
            attrNode[attrName] = parser(attrNode[attrName], context);
        }
    });

    context.errorContext = errorContext;

    if (attrNames.length > 0) {
        throw new ImplementationError(`Invalid option "${attrNames.join(', ')}"${context.errorContext}`);
    }
}
function parseNode(attrNode, parsers, context) {
    const attrNames = Object.keys(attrNode);
    const errorContext = context.errorContext;

    Object.keys(parsers).forEach(attrName => {
        const parser = parsers[attrName];

        context.errorContext = ` (option "${attrName}"${errorContext})`;
        removeValue(attrNames, attrName);

        if (attrName in attrNode && parser !== null) {
            attrNode[attrName] = parser(attrNode[attrName], context);
        }
    });

    context.errorContext = errorContext;

    if (attrNames.length > 0) {
        throw new ImplementationError(`Invalid option "${attrNames.join(', ')}"${context.errorContext}`);
    }
}
function parseNode ( attrNode , parsers , context ) { const attrNames = Object . keys ( attrNode ) ; const errorContext = context . errorContext ; Object . keys ( parsers ) . forEach ( attrName => { const parser = parsers [ attrName ] ; context . errorContext = ` ${ attrName } ${ errorContext } ` ; removeValue ( attrNames , attrName ) ; if ( attrName in attrNode && parser !== null ) { attrNode [ attrName ] = parser ( attrNode [ attrName ] , context ) ; } } ) ; context . errorContext = errorContext ; if ( attrNames . length > 0 ) { throw new ImplementationError ( ` ${ attrNames . join ( ', ' ) } ${ context . errorContext } ` ) ; } }
Meta function which calls the defined parsers for current node and fails
on additionally defined options.

@private
Meta function which calls the defined parsers for current node and fails on additionally defined options .