Skip to content

utilityjs/string

Repository files navigation

@utility/string

JSR Version JSR Score Test Status Coverage License

Collection of string utility functions

Usage

underscoreToTitleCase - Converts provided underscore format string to camel case

import { underscoreToTitleCase } from "@utility/string";

underscoreToTitleCase("hello_world");
// => Hello World

toBoolean - Converts a string value to a boolean.

import { toBoolean } from "@utility/string";

const trueValue = toBoolean("true"); // true