Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/string/index.js>capitalize

A JavaScript extension package for building strong and modern applications.
Latest
function capitalize
import { capitalize } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/string/index.js";

Capitalizes the string, if all is true, all words are capitalized, otherwise only the first word will be capitalized.

Examples

Example 1

import { capitalize } from "@ayonli/jsext/string";

console.log(capitalize("hello world")); // Hello world
console.log(capitalize("hello world", true)); // Hello World