Sha256: 65b824ac9933122e7d5c2bdaa4cdcb47e64f64cf8a816eb9eb2be54e79766352
Contents?: true
Size: 363 Bytes
Versions: 5
Compression:
Stored size: 363 Bytes
Contents
import { camelCase } from 'lodash'; export const propsToCamelCase = ob => propsToCase(camelCase, 'propsToCamelCase only takes objects', ob); const propsToCase = (casingFn, errorMsg, ob) => { if (typeof ob !== 'object') throw Error(errorMsg); return Object.keys(ob).reduce((memo, key) => { memo[casingFn(key)] = ob[key]; return memo; }, {}); };
Version data entries
5 entries across 5 versions & 1 rubygems