Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 593 Bytes

humanize.md

File metadata and controls

20 lines (14 loc) · 593 Bytes

humanize (source code)

  • Curried: false
  • Failsafe status: alternative available

The humanize function converts common developer-friendly string formats such as camelCase, snake_case, dash-case, etc., into human-readable strings.

Arguments:

  • string: The string to be converted.

Usage:

humanize("helloWorld"); // "Hello world"
humanize("hello-world"); // "Hello world"
humanize("__hello_world"); // "Hello world"
humanize("HelloUSA"); // "Hello usa"