UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

6 lines (5 loc) 183 B
export function createPath(path, delimiter = '.') { return typeof path === 'string' ? path.split(delimiter).map(x => (Number.isInteger(Number(x)) ? Number(x) : x)) : path }