lib/helpers/indexes.js
function validateExtensions(input) {
  return new Promise((resolve, reject) => {
    try {
      const extensionPath = getExtensionsPath();

      if (!fs.existsSync(extensionPath)) {
        fs.mkdirSync(extensionPath);
      }

      if (!input.imports.length) {
        return resolve(null);
      }

      return resolve(input);
    } catch (e) {
      return reject(new Error(t('EXTENSION_COULD_NOT_BE_VALIDATED')));
    }
  });
}
function validateExtensions(input) {
  return new Promise((resolve, reject) => {
    try {
      const extensionPath = getExtensionsPath();

      if (!fs.existsSync(extensionPath)) {
        fs.mkdirSync(extensionPath);
      }

      if (!input.imports.length) {
        return resolve(null);
      }

      return resolve(input);
    } catch (e) {
      return reject(new Error(t('EXTENSION_COULD_NOT_BE_VALIDATED')));
    }
  });
}
function validateExtensions ( input ) { return new Promise ( ( resolve , reject ) => { try { const extensionPath = getExtensionsPath ( ) ; if ( ! fs . existsSync ( extensionPath ) ) { fs . mkdirSync ( extensionPath ) ; } if ( ! input . imports . length ) { return resolve ( null ) ; } return resolve ( input ) ; } catch ( e ) { return reject ( new Error ( t ( 'EXTENSION_COULD_NOT_BE_VALIDATED' ) ) ) ; } } ) ; }
Validates the extensions input.
@param {Object} input The input.
@return {Promise}
Validates the extensions input .