UNPKG

@pagopa/dx-cli

Version:

A CLI useful to manage DX tools.

9 lines (8 loc) 272 B
import * as YAML from "yaml"; export const isChildOf = (path, key) => { const ancestor = path.at(-1); return (YAML.isPair(ancestor) && YAML.isScalar(ancestor.key) && typeof ancestor.key.value === "string" && ancestor.key.value === key); };