Spec-Zone.ru › Deno 2

@std/fmt

Overview

Provides utilities for formatting text of different types:

  • Human-readable bytes
  • Styles for the CLI
  • Time duration
  • Printing formatted strings to stdout
import { format } from "@std/fmt/bytes";
import { red } from "@std/fmt/colors";

console.log(red(format(1337))); // Prints "1.34 kB"

Runtime compatibility

bytes, colors, and duration supports all major runtimes. printf is mostly compatible with major runtimes, however some of features, such as %v, %i and %I format specifiers, are only available in Deno. See the API docs for details.

Add to your project

›_
deno add jsr:@std/fmt

See all symbols in @std/fmt on

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/std/fmt

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API