1.1.1 • Published 6 years ago

mergeyaml v1.1.1

Weekly downloads
147
License
MIT
Repository
github
Last release
6 years ago

NPM Version

Recursively merge yaml documents in a new one

Node.js Usage

install

npm install mergeyaml --save

one.yml

1: hello
4:
    4.1: jhon
    4.2: doe

two.yml

2: world
4:
    4.1: jhon
    4.2: lenon
    4.3: from two

three.yml

3: '!'
4: 
    4.1: jhon
    4.2: lennon
    4.3: from three

example.js

'use strict';
var fs = require('fs');
var mergeyaml = require('mergeyaml');

var one = fs.readFileSync(__dirname + '/one.yml', 'utf8');
var two = fs.readFileSync(__dirname + '/two.yml', 'utf8');
var three = fs.readFileSync(__dirname + '/three.yml', 'utf8');

console.log(mergeyaml(one, two, three));
// or
console.log(mergeyaml([one, two, three]));
// ->
/*
1: hello
2: world
3: '!'
4: 
    4.1: jhon
    4.2: doe
    4.3: from two 
*/

Terminal Usage

npm install -g mergeyaml
mergeyaml $(cat one.yml) $(cat two.yml) $(cat three.yml)
# ->
#
# 1: hello
# 2: world
# 3: '!'
# 4: 
#     4.1: jhon
#     4.2: doe
#     4.3: from two 
1.1.1

6 years ago

1.1.0

8 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.30

9 years ago

1.0.29

9 years ago

1.0.28

9 years ago

1.0.27

9 years ago

1.0.25

9 years ago

1.0.26

10 years ago

1.0.24

10 years ago

1.0.23

10 years ago

1.0.22

10 years ago

1.0.21

10 years ago

1.0.20

10 years ago

1.0.19

10 years ago

1.0.18

10 years ago

1.0.17

10 years ago

1.0.16

10 years ago

1.0.14

10 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago