index.js
function setDefaultOptions(options) {
  const defaultOptions = {
    src           : [
      '**/*.i18n.json',
      '**/i18n/*.json',
      '!node_modules'
    ],
    destFile      : 'translations.pot',
    headers       : {
      'X-Poedit-Basepath'     : '..',
      'X-Poedit-SourceCharset': 'UTF-8',
      'X-Poedit-SearchPath-0' : '.'
    },
    defaultHeaders: true,
    writeFile     : true
  };

  if (options.headers === false) {
    options.defaultHeaders = false;
  }

  options = Object.assign({}, defaultOptions, options);

  if (!options.package) {
    options.package = options.domain || 'unnamed project';
  }

  return options;
}
function setDefaultOptions(options) {
  const defaultOptions = {
    src           : [
      '**/*.i18n.json',
      '**/i18n/*.json',
      '!node_modules'
    ],
    destFile      : 'translations.pot',
    headers       : {
      'X-Poedit-Basepath'     : '..',
      'X-Poedit-SourceCharset': 'UTF-8',
      'X-Poedit-SearchPath-0' : '.'
    },
    defaultHeaders: true,
    writeFile     : true
  };

  if (options.headers === false) {
    options.defaultHeaders = false;
  }

  options = Object.assign({}, defaultOptions, options);

  if (!options.package) {
    options.package = options.domain || 'unnamed project';
  }

  return options;
}
function setDefaultOptions ( options ) { const defaultOptions = { src : [ '**/*.i18n.json' , '**/i18n/*.json' , '!node_modules' ] , destFile : 'translations.pot' , headers : { 'X-Poedit-Basepath' : '..' , 'X-Poedit-SourceCharset' : 'UTF-8' , 'X-Poedit-SearchPath-0' : '.' } , defaultHeaders : true , writeFile : true } ; if ( options . headers === false ) { options . defaultHeaders = false ; } options = Object . assign ( { } , defaultOptions , options ) ; if ( ! options . package ) { options . package = options . domain || 'unnamed project' ; } return options ; }
Set default options.

@param {Object} options

@return {Object}
Set default options .