Skip to content

lengthEqual ​

lengthEqual() tests whether the length of a String equals a value. Supports the curried version.

Interactive example ​

Syntax ​

Classic signature ​

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

Curried signature ​

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

Parameters ​

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

Return value ​

A boolean indicating whether primitive.length === length.

See also ​

Released under the MIT license.