Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yawn-yaml

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yawn-yaml

YAML parser that preserves comments and styling

  • 2.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8.5K
decreased by-27.59%
Maintainers
0
Weekly downloads
 
Created
Source

YAWN YAML 🥱

YAML parser that preserves comments and styling

Live Demo

Usage

import YAWN from 'yawn-yaml';

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

let yawn = new YAWN(str);

// update the `json` property
yawn.json = { value: 2 };

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

Installation

Use npm or yarn to install yawn-yaml package

npm install --save yawn-yaml
yarn add yawn-yaml

Development

To install dependencies run:

yarn install

To run tests continuously and watch for changes

yarn start

To run the test run:

yarn test

License

MIT

FAQs

Package last updated on 12 Aug 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc