MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / trimStart

Method trimStart

benchmark/data-min.js:822–831  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

820 return this.trimStart(t).trimEnd(t);
821 }
822 trimStart(t) {
823 const e = new RegExp('^' + (t || '\\s') + '+');
824 if (((this.intro = this.intro.replace(e, '')), !this.intro)) {
825 let n,
826 i = 0;
827 do if (((n = this.sources[i++]), !n)) break;
828 while (!n.content.trimStartAborted(t));
829 }
830 return this;
831 }
832 trimEnd(t) {
833 const e = new RegExp((t || '\\s') + '+$');
834 let n,

Callers 1

trimMethod · 0.95

Calls 2

replaceMethod · 0.45
trimStartAbortedMethod · 0.45

Tested by

no test coverage detected