packages/okam-build/lib/processor/helper/builtin.js
function addFileExtnameAssociatedProcessor(extnames, processorName, existedMap) {
    if (!extnames) {
        return;
    }

    if (!Array.isArray(extnames)) {
        extnames = [extnames];
    }

    extnames.forEach(k => {
        k = k.toLowerCase();

        let processors = existedMap[k];
        if (Array.isArray(processors)) {
            processors.push(processorName);
        }
        else if (processors) {
            existedMap[k] = [processors, processorName];
        }
        else {
            existedMap[k] = processorName;
        }
    });
}
function addFileExtnameAssociatedProcessor(extnames, processorName, existedMap) {
    if (!extnames) {
        return;
    }

    if (!Array.isArray(extnames)) {
        extnames = [extnames];
    }

    extnames.forEach(k => {
        k = k.toLowerCase();

        let processors = existedMap[k];
        if (Array.isArray(processors)) {
            processors.push(processorName);
        }
        else if (processors) {
            existedMap[k] = [processors, processorName];
        }
        else {
            existedMap[k] = processorName;
        }
    });
}
Add the file extname associated processors.

@inner
@param {string|Array.<string>} extnames the file extnames
@param {string} processorName the processor name
@param {Object} existedMap the existed file extname associated processors map