1.0.5 • Published 3 years ago

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

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years 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

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago