1/** 2 * Formatter file for extracting messages. Replaces default formatter. see https://formatjs.io/docs/tooling/cli#--format-path 3 * 4 * Message files will be in this format: 5 * { 6 * [key]: string 7 * } 8 */ 9const format = (msgs) => { 10 const results = {} 11 for (const key in msgs) { 12 results[key] = msgs[key].defaultMessage 13 } 14 return results 15} 16module.exports = { format } 17 18