bs-js-beautify
v0.1.1
Published
BuckleScript bindings for js-beautify library
Downloads
6
Maintainers
Readme
bs-js-beautify
BuckleScript bindings for js-beautify library.
Installation
npm i --save bs-js-beautify js-beautify
Then add bs-js-beautify
as a dependency to bsconfig.json
.
Usage
let uglyCode = "if(window.x){console.log('It is x');}else{console.log('It is not');}"
in let prettyCode = JsBeautify.beautify ~indent_size:2 uglyCode
in Js.log prettyCode;;
if (window.x) {
console.log('It is x');
} else {
console.log('It is not');
}