Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Remove unnecessary semicolons. Or add them. Whatever.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 LICENSE.BSD
Octocat-spinner-32 package.json
Octocat-spinner-32 scmin.js

scmin removes unnecessary semicolons from JavaScript.

scmax adds unnecessary semicolons to JavaScript.

Based on the Esprima JavaScript parser (


npm install -g scmin


scmin unnecessary-semicolons.js > lovely.js

scmax not-enough-semicolons.js > bloated.js

scmin i-like-pipes.js | scmax > why-not.js

The fine print

JavaScript's automatic semicolon insertion allows you to omit semicolons in certain situations.

scmin removes semicolons that are unnecessary due to automatic semicolon insertion.

scmax adds explicit semicolons so that automatic semicolon insertion is never used.

Both of them preserve whitespace; only semicolons are added or removed.

Something went wrong with that request. Please try again.