UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

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 }