Skip to main content
Module

x/simple_utility/mod.full.ts>trimExtend

Simplify processing for Deno.
Go to Latest
function trimExtend
import { trimExtend } from "https://deno.land/x/simple_utility@v2.0.10/mod.full.ts";

Trim head and tail blank, remove CR and consecutive space (tab, LF) to single space (tab, LF).

Examples

Example 1

const format = trimExtend("  Lorem ipsum\r dolor   sit  \r\r amet. ");

Parameters

data: string

Returns

string