1.0.5 • Published 1 year ago

@yaml-tools/get-node-path v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@yaml-tools/get-node-path

A utility for the yaml package that converts an array of nodes to a simple path to node represented via an array of strings or numbers. Would most be commonly used in YAML.visit().

import getNodePath from `@yaml-tools/get-node-path`;

YAML.visit(yaml, (key, node, path) => {
  console.log(getNodePath(path));
});

// ['this', 'is', 'node', 'path']
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago