Skip to content

Instantly share code, notes, and snippets.

@6ewis
Created May 10, 2016 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 6ewis/5a44656e0aefc20b2acc6dfd2e9bc434 to your computer and use it in GitHub Desktop.
Save 6ewis/5a44656e0aefc20b2acc6dfd2e9bc434 to your computer and use it in GitHub Desktop.
const renameKeysOf = (prefix) => {
return renameKeys(
{`${prefix}_line_1`: 'line_1',
`${prefix}_line_2`: 'line_2',
`${prefix}_line_3`: 'line_3',
`${prefix}_line_4`: 'line_4',
`${prefix}_locality`: 'locality',
`${prefix}_region`: 'region',
`${prefix}_postal_code`: 'postal_code',
`${prefix}_country_name`: 'country_name'
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment