Socket
Socket
Sign inDemoInstall

align-yaml

Package Overview
Dependencies
2
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    align-yaml

Format, prettify, align, whatever you want to call it. This does that to YAML.


Version published
Maintainers
1
Install size
18.7 kB
Created

Readme

Source

align-yaml NPM version

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.

Keywords

FAQs

Last updated on 28 Mar 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc