utils.js
/**
 * Check if given package is enabled or not
 * @param {Array} enabled All forcefully enabled packages
 * @param {Array} disabled All forcefully disabled packages
 * @param {Object} meta Package metadata
 * @return {Boolean}
 */
Check if given package is enabled or not
@param {Array} enabled All forcefully enabled packages
@param {Array} disabled All forcefully disabled packages
@param {Object} meta Package metadata
@return {Boolean}
Check if given package is enabled or not @param { Array } enabled All forcefully enabled packages @param { Array } disabled All forcefully disabled packages @param { Object } meta Package metadata @return { Boolean }
function checkEnabledState(enabled, disabled, meta) {
  const name = meta.path;
  const shortName = meta.path.split('/')[1];
  if ( String(meta.enabled) === 'false' ) {
    if ( enabled.indexOf(shortName) !== -1 || enabled.indexOf(name) !== -1 ) {
      return true;
    }
    return false;
  }
  if ( disabled.indexOf(shortName) !== -1 || disabled.indexOf(name) !== -1 ) {
    return false;
  }
  return true;
}
function checkEnabledState ( enabled , disabled , meta ) { const name = meta . path ; const shortName = meta . path . split ( '/' ) [ 1 ] ; if ( String ( meta . enabled ) === 'false' ) { if ( enabled . indexOf ( shortName ) !== - 1 || enabled . indexOf ( name ) !== - 1 ) { return true ; } return false ; } if ( disabled . indexOf ( shortName ) !== - 1 || disabled . indexOf ( name ) !== - 1 ) { return false ; } return true ; }
Check if given package is enabled or not
 @param {Array} enabled All forcefully enabled packages
 @param {Array} disabled All forcefully disabled packages
 @param {Object} meta Package metadata
 @return {Boolean}
Check if given package is enabled or not @param { Array } enabled All forcefully enabled packages @param { Array } disabled All forcefully disabled packages @param { Object } meta Package metadata @return { Boolean }