Skip to content

Instantly share code, notes, and snippets.

@6ewis 6ewis/renamekeysDynamic.js Secret
Created May 10, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.