TrimPattern

import { TrimPattern } from "jsr:@ende/text/unstable-trim-by";

type alias ยท experimental

type TrimPattern = string | Iterable<string> | RegExp

A pattern that can be used to trim characters from an input string.

  • If string, trim all substrings equal to the string.
  • If Iterable<string>, trim all substrings equal to any member.
  • If RegExp, trim all substrings that match the regex.

Source