UNPKG

kasi

Version:

A collection of functions for working with different casings.

11 lines (10 loc) 269 B
/* IMPORT */ import toSpaceCase from './to_space_case.js'; /* HELPERS */ const upperRe = /\s(\w)/g; /* MAIN */ const toCamelCase = (value) => { return toSpaceCase(value).replace(upperRe, (_, char) => char.toUpperCase()); }; /* EXPORT */ export default toCamelCase;