packages/okam-build/lib/processor/json/quick-app-json.js
function getUsedAPIFeatures(features, options) {
    let {
        logger,
        getAllUsedAPIFeatures
    } = options;
    let result = [];
    let existed = {};
    features && features.forEach(
        item => normalizeFeatureItem(item, existed, result, logger)
    );

    let usedFeatures = getAllUsedAPIFeatures();
    usedFeatures && usedFeatures.forEach(item => {
        // remove feature name leading character `@`
        item = item.substr(1);
        normalizeFeatureItem(item, existed, result, logger);
    });

    return result.length ? result : null;
}
function getUsedAPIFeatures(features, options) {
    let {
        logger,
        getAllUsedAPIFeatures
    } = options;
    let result = [];
    let existed = {};
    features && features.forEach(
        item => normalizeFeatureItem(item, existed, result, logger)
    );

    let usedFeatures = getAllUsedAPIFeatures();
    usedFeatures && usedFeatures.forEach(item => {
        // remove feature name leading character `@`
        item = item.substr(1);
        normalizeFeatureItem(item, existed, result, logger);
    });

    return result.length ? result : null;
}
function getUsedAPIFeatures ( features , options ) { let { logger , getAllUsedAPIFeatures } = options ; let result = [ ] ; let existed = { } ; features && features . forEach ( item => normalizeFeatureItem ( item , existed , result , logger ) ) ; let usedFeatures = getAllUsedAPIFeatures ( ) ; usedFeatures && usedFeatures . forEach ( item => { // remove feature name leading character `@` item = item . substr ( 1 ) ; normalizeFeatureItem ( item , existed , result , logger ) ; } ) ; return result . length ? result : null ; }
Get used API feature declarations
Support the following format feature input:
[
'system.xxx',
['system.abc', {a: 3}],
{name: 'xx', params: {bb: 33}}
]

output:
[
{name: 'system.xxx'},
{name: 'system.abc', params: {a: 3}},
{name: 'xx', params: {bb: 33}}
]

@inner
@param {Array} features the existed features
@param {Object} options the processor options
@return {?Array.<Object>}
Get used API feature declarations Support the following format feature input : [ system . xxx [ system . abc { a : 3 } ] { name : xx params : { bb : 33 }} ]