Skip to main content
Module

x/rambda/source/length.js

Faster and smaller alternative to Ramda
Latest
File
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}