indentation-script

1.0.1 • Public • Published

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)

Package Sidebar

Install

npm i indentation-script

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.72 kB

Total Files

5

Last publish

Collaborators

  • hhhhhhhhhn