Skip to content

lengthLessThan

lengthLessThan() tests whether the length of a String is strictly less than a value. Supports the curried version.

Interactive example

Syntax

Classic signature

typescript
function lengthLessThan(
	primitive: String, 
	length: Number | number
): boolean

Curried signature

typescript
function lengthLessThan(
	length: Number | number
): (primitive: String) => boolean

Parameters

  • primitive : wrapped String (classic signature only).
  • length : comparison threshold.

Return value

A boolean indicating whether primitive.length < length.

See also

Released under the MIT license.