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

x/eta/utils.ts>trimWS

Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript
Go to Latest
function trimWS
import { trimWS } from "https://deno.land/x/eta@v2.0.0/utils.ts";

Takes a string within a template and trims it, based on the preceding tag's whitespace control and config.autoTrim

Parameters

str: string
config: EtaConfig
wsLeft: string | false
optional
wsRight: string | false

Returns

string