removePrefix alternatives

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
.slice
let str = 'greninja'
str.slice('gren'.length - 1)
ready
regex
let str = 'greninja'
str.replace(/^gren/, '')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.