Generating slugs
JavaScript performance comparison
Preparation code
<script>
// custom colors
ui.browserscope.colors = ['pink', '#43C6DB'];
var arr = [
'This is just a test', // → "this-is-just-a-test"
'Some “weird” characters: ©™® Awesome', // → "some-weird-characters-awesome"
'Lorem ipsum 123 dolor' // → "lorem-ipsum-123-dolor"
];
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
Using several
.replace() s
|
|
pending… |
Using
.match() and .join()
|
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit
to the URL.
- Revision 1: published Mathias Bynens and last updated
- Revision 5: published Kristof Neirynck
- Revision 7: published mathiasbaert
- Revision 8: published imma
- Revision 9: published Tri and last updated
- Revision 10: published Ross
0 Comments