Socket
Socket
Sign inDemoInstall

yawn-yaml

Package Overview
Dependencies
6
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yawn-yaml

YAML parser that preserves comments and styling


Version published
Weekly downloads
2.7K
increased by3.89%
Maintainers
1
Install size
2.92 MB
Created
Weekly downloads
 

Readme

Source

YAWN YAML

Build Status

YAML parser that preserves comments and styling

Live Demo

Usage

// If you use ES2015 modules
import YAWN from 'yawn-yaml';

// If you use CommonJS modules
const YAWN = require('yawn-yaml/cjs')

let str = `
# my comment
value: 1 # the value is here!
`;

let yawn = new YAWN(str);

yawn.json = {value: 2};


// value in `yawn.yaml` is now changed.
console.log(yawn.yaml); // =>
// # my comment
// value: 2 # the value is here!

Installation

Use npm or Bower to install "yawn-yaml" package

npm install --save yawn-yaml
bower install --save yawm-yaml

If you wish to depend to ES6 version use src/index.js file.

Development

To install dependencies run:

npm install

To run the test run:

npm test

To run tests continuously and watch for changes install mocha and run:

mocha --compilers js:babel/register -w

To make a new build run:

npm run browserify

License

MIT

Keywords

FAQs

Last updated on 28 Jan 2020

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