New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

yamedit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yamedit

Modify human maintained YAML files

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

yamedit

yamedit tries to solve the problem of modifying human maintained YAML files in a clean and safe way. It preserves the structure/layout of the existing YAML string, as well as any comments in the file.

It is not a fully-fledged YAML parser/writer, and only deals with updating values for existing fields in a YAML file. It cannot add new fields or new sub-trees to the data structure.

Example

const fs = require('fs');
const yamedit = require('yamedit');

const yaml = fs.readFileSync('config.yaml');

const newYAML = yamedit.edit(yaml, 'path.to[3].field', 'newValue');

fs.writeFileSync('config.yaml');

FAQs

Package last updated on 21 Oct 2016

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