Skip to content

finnp/yml-in-place

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yml-in-place

Build Status Coverage Status js-standard-style semantic-release

NPM

Currently only supports adding a value to a block sequence. But includes utilities to fairly easily also add other features like setting or removing values from maps or sequences.

Usage

const addToSequence = require('yml-in-place').addToSequence

const yml = `
 language: node_js
 branches:
   only:
     - master
`

const newYml = addToSequence(yml, ['branches', 'only'], 'greenkeeper')
console.log(newYml)
// language: node_js
// branches:
//   only:
//     - master
//     - greenkeeper

About

Minimal diff yaml editing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published