UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

8 lines (6 loc) 209 B
import { isInteger } from './isInteger.js' export function createPath(path, delimiter = '.'){ return typeof path === 'string' ? path.split(delimiter).map(x => isInteger(x) ? Number(x) : x) : path }