packages/okam-build/lib/processor/helper/builtin.js
function getFileExtnameAssociatedProcessor(processors) {
    let result = Object.keys(processors).reduce(
        (lastValue, processorName) => {
            let processor = processors[processorName];
            let extnames = processor.extnames || [];
            if (!Array.isArray(extnames)) {
                extnames = [extnames];
            }
            addFileExtnameAssociatedProcessor(extnames, processorName, lastValue);
            return lastValue;
        },
        {}
    );

    Object.keys(result).forEach(
        k => sortDefaultProcessors(result[k], processors)
    );
    return result;
}
function getFileExtnameAssociatedProcessor(processors) {
    let result = Object.keys(processors).reduce(
        (lastValue, processorName) => {
            let processor = processors[processorName];
            let extnames = processor.extnames || [];
            if (!Array.isArray(extnames)) {
                extnames = [extnames];
            }
            addFileExtnameAssociatedProcessor(extnames, processorName, lastValue);
            return lastValue;
        },
        {}
    );

    Object.keys(result).forEach(
        k => sortDefaultProcessors(result[k], processors)
    );
    return result;
}
function getFileExtnameAssociatedProcessor ( processors ) { let result = Object . keys ( processors ) . reduce ( ( lastValue , processorName ) => { let processor = processors [ processorName ] ; let extnames = processor . extnames || [ ] ; if ( ! Array . isArray ( extnames ) ) { extnames = [ extnames ] ; } addFileExtnameAssociatedProcessor ( extnames , processorName , lastValue ) ; return lastValue ; } , { } ) ; Object . keys ( result ) . forEach ( k => sortDefaultProcessors ( result [ k ] , processors ) ) ; return result ; }
Get the map of the file extname with processor name.

@inner
@param {Object} processors the builtin processors, the key is processor name,
the value is the processor config information.
@return {Object}
Get the map of the file extname with processor name .