UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

9 lines (6 loc) 173 B
import { isArray } from './_internals/isArray.js' export function length(x){ if (isArray(x)) return x.length if (typeof x === 'string') return x.length return NaN }