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

x/gfm/deps.ts>Marked.helpers.rtrim

Server-side GitHub Flavored Markdown rendering for Deno
Go to Latest
function Marked.helpers.rtrim
import { Marked } from "https://deno.land/x/gfm@0.3.0/deps.ts";
const { rtrim } = Marked.helpers;

Remove trailing 'c's. Equivalent to str.replace(/c$/, ''). /c$/ is vulnerable to REDOS.

Parameters

str: string
c: string
optional
invert: boolean

Remove suffix of non-c chars instead. Default falsey.

Returns

string