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.
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