├── CONTRIBUTING.md ├── README.md ├── package.json └── semicolons.js /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Every line in the code must be properly terminated by a semicolon; 2 | Additionally, commit messages must be properly terminated as well; 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Ensure that all JavaScript programs have the maximum amount of safety; 2 | when you `require("semicolons")`, **THEY ARE REQUIRED**; 3 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 3 | "name": "semicolons", 4 | "description": "THEY ARE REQUIRED;", 5 | "version": "1.0.2", 6 | "main": "./semicolons.js", 7 | "repository": { 8 | "type": "git", 9 | "url": "git://github.com/isaacs/semicolons.git" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /semicolons.js: -------------------------------------------------------------------------------- 1 | ;// require('semicolons') ==> they are REQUIRED!; 2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3 | var fs = require('fs');;;;;;;;;;;;;;;;;;;;;;;;;;; 4 | require.extensions['.js'] = (function (orig) {;;; 5 | ;;return function (mod, f) {;;;;;;;;;;;;;;;;;;;;; 6 | ;;;;var data = fs.readFileSync(f, 'utf8');;;;;;;; 7 | ;;;;if (data.match(/[^;]\s*\n/)) {;;;;;;;;;;;;;;; 8 | ;;;;;;var errStr = 'Unsafe \\n without ; in '+ f; 9 | ;;;;;;throw new Error(errStr);;;;;;;;;;;;;;;;;;;; 10 | ;;;;};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 11 | ;;;;return orig.call(this, mod, f);;;;;;;;;;;;;;; 12 | ;;};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 13 | })(require.extensions['.js']);;;;;;;;;;;;;;;;;;;; 14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15 | ; 16 | ; 17 | ; 18 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 19 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 20 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 22 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 25 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 27 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 28 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 30 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32 | --------------------------------------------------------------------------------