UNPKG
@pagopa/dx-cli
Version:
latest (0.15.5)
0.15.5
0.15.4
0.15.3
0.15.2
0.15.1
0.15.0
0.14.5
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
0.13.0
0.11.2
0.11.1
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.0
0.8.2
0.8.1
0.8.0
0.7.0
0.6.0
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
A CLI useful to manage DX tools.
github.com/pagopa/dx
pagopa/dx
@pagopa/dx-cli
/
dist
/
adapters
/
codemods
/
yaml.js
9 lines
(8 loc)
•
272 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
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); };