UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

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