Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

containsWhitespace

Checks if the given string contains whitespace.

Type signature

(x: string) => boolean

Examples

containsWhitespace("test string");
// ⇒ true
containsWhitespace("test");
// ⇒ false

Questions

  • How to check if a string contains whitespace?

empty

Empty string.

Type signature

""

Examples

empty();
// ⇒ ""

Questions

  • How to get an empty string?

firstToLower

Transforms the first character to lowercase.

Type signature

(text: string) => string

Examples

firstToLower("TeSt");
// ⇒ "teSt"

Questions

  • How to make the first letter of a string lowercase?

firstToUpper

Transforms the first character to uppercase.

Type signature

(text: string) => string

Examples

firstToUpper("teSt");
// ⇒ "TeSt"

Questions

  • How to make the first letter of a string uppercase?

includes

Checks if the given substring is present in the source string.

Type signature

(search: string) => (text: string) => boolean

Examples

includes("brown fox")("The quick brown fox jumps over the lazy dog");
// ⇒ true
includes("brown dog")("The quick brown fox jumps over the lazy dog");
// ⇒ false

Questions

  • How to check if a string contains a given substring?

nbsp

Non-breaking space.

Type signature

" "

Examples

nbsp;
// ⇒ " "

Questions

  • How to get a non-breaking space?

nonEmpty

Checks if the given string is present and is not empty or all whitespace.

Type signature

(x?: string) => boolean

Examples

nonEmpty("test with spaces");
// ⇒ true
nonEmpty("   ");
// ⇒ false
nonEmpty(null);
// ⇒ false

Questions

  • How to check if a string is non-empty?
  • How to check if a string is not all whitespace?
  • How to check if a string is not null or undefined?

startsWith

Checks if the given string starts with the given substring.

Type signature

(prefix: string) => (xs: string) => boolean

Examples

startsWith("The")("The quick brown fox jumps over the lazy dog");
// ⇒ true
startsWith("Quick")("The quick brown fox jumps over the lazy dog");
// ⇒ false

Questions

  • How to check if a string starts with a given substring?