deepmerge-yaml
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

deepmerge-yaml

deep merge yaml files

Install

$ npm install -g deepmerge-yaml

Usage

stdio

$ npx deepmerge-yaml /path/to/some1.yaml /path/to/some2.yaml

write file

$ npx deepmerge-yaml -o /path/to/some1.yaml /path/to/some2.yaml /path/to/some3.yaml

Spec

import * as fs from 'fs';
import * as path from 'path';
import { deepmergeYaml } from 'deepmerge-yaml';

const a = fs.readFileSync(path.resolve(__dirname, './a.yaml')).toString().trim();
const b = fs.readFileSync(path.resolve(__dirname, './b.yaml')).toString().trim();
const output = fs.readFileSync(path.resolve(__dirname, './output.yaml')).toString().trim();

test('nested properties', () => {
  const result = deepmergeYaml(a, b).trim();

  expect(result).toBe(output);
});

/deepmerge-yaml/

    Package Sidebar

    Install

    npm i deepmerge-yaml

    Weekly Downloads

    80

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    15

    Last publish

    Collaborators

    • k-okina