JavaScript utilities Free template

JavaScript utility belt

Eight small, dependency-free helper functions (debounce, throttle, formatting, deep clone, grouping and more) with a live demo.

Live preview

The preview runs in a sandbox: it cannot reach your account, cookies or the network.

About this template

A file of everyday JavaScript helpers that you can copy into any project: debounce, throttle, formatCurrency, formatRelativeTime, deepClone, groupBy, chunk and slugify. Each one is short, documented with a comment and has no dependencies. The demo page runs them and prints the results, and the Console tab of the playground shows the same output, so you can see how each function behaves.

javascriptutilitieshelpersdebounce

Look under the hood

Included source files

712 bytes
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>JavaScript utilities</title>
  <style>
    body { font-family: system-ui, sans-serif; max-width: 46rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.5; }
    .line { display: flex; flex-direction: column; padding: 0.5rem 0; border-bottom: 1px solid #e3e6e9; }
    code { color: #c00000; }
  </style>
</head>
<body>
  <h1>JavaScript utilities</h1>
  <p>Results of each helper in <code>utils.js</code>. Open the Console tab to see the same output.</p>
  <div id="output"></div>
  <script src="utils.js"></script>
  <script src="demo.js"></script>
</body>
</html>

Update history

  1. 1.0.0

    First release.