Run. Copy. Learn.

1,180 polyglot code snippets you can run in your browser or terminal.

JavaScriptPythonRubyPHPBash
slugify.js
// Convert text to URL-safe slug
function slugify(text) {
return text
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-|-$/g, '');
}
Output
slugify("Hello World!")"hello-world"

Snippets Gallery

Browse and run snippets in your browser.

704 general297 utilities170 algorithms

Command Line

Run snippets from your terminal. Pipes, offline mode, MCP support.

$temper run slugify--text="Hello"
hello
379JavaScript
197Python
200Ruby
201PHP
203Bash