align-yaml
Format, prettify, align, whatever you want to call it. This does that to YAML.
Install
Install with npm:
npm i align-yaml --save-dev
Usage
Messy YAML (foo.yml
):
one: two
three: four
seventeen: five
Read in the YAML as a string, don't parse it:
var align = require('align-yaml');
var str = require('fs').readFileSync('foo.yml').toString();
align(str);
Pretty YAML:
one: two
three: four
seventeen: five
pad
Or, pass in a number:
align(str, 15);
Results in:
one: two
three: four
seventeen: five
See the tests for a basic example.
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on March 28, 2014.