diff options
Diffstat (limited to 'src/services/attributes_helper/attributes_helper.service.js')
| -rw-r--r-- | src/services/attributes_helper/attributes_helper.service.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/services/attributes_helper/attributes_helper.service.js b/src/services/attributes_helper/attributes_helper.service.js new file mode 100644 index 00000000..74d3323c --- /dev/null +++ b/src/services/attributes_helper/attributes_helper.service.js @@ -0,0 +1,8 @@ +import { kebabCase } from 'lodash' + +const propsToNative = props => Object.keys(props).reduce((acc, cur) => { + acc[kebabCase(cur)] = props[cur] + return acc +}, {}) + +export { propsToNative } |
