indentation script
Modification of ES, made to include python-style indentation rules
Example
Made using the isToEs()
function:
IS:
function fib(n):
var results = [0,1]
for(var i = 0; i < n; i++):
temp = results[1]
results[1] = results[0] + temp
results[0] = temp
return results[0]
console.log(fib(5))
ES:
function fib(n){
var results = [0,1]
for(var i = 0; i < n; i++){
temp = results[1]
results[1] = results[0] + temp
results[0] = temp
}
return results[0]
}
console.log(fib(5))
CLI Usage
$ is .
Finds all .is
files and creates a .js
file with the same name (recursive)