Exemple
Manipulate YAML Document AST paths, preserve comments, control scalar styles, and transform nodes with visit in yaml
sha256:e48bea588f5dd5489beab783c6a88de0ad1b37a153accb93af38e0689dfd3a1d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- node
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- node
- Langage
- node
- Gestionnaire de paquets
- npm
Environnements des exécutions de vérification
- Contexte d'exécution
- node 22
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- node 22
- Langage
- javascript
- Gestionnaire de paquets
- npm
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Cas
- Objectif
- Manipulate YAML Document AST paths, preserve comments, control scalar styles, and transform nodes with visit in yaml HOW
- Paquets
-
yaml 2.9.0
- Environnement
- node
- Créé
- 2026-08-17T14:47:12Z
Contrat
- yaml.parseDocument returns a Document AST whose scalar values can be read and mutated via path arrays while preserving existing comments upon serialization
- doc.getIn with keepScalar flag returns the AST Scalar node to allow inspecting and updating scalar formatting styles
- doc.addIn, doc.deleteIn, and doc.hasIn manipulate sequence and mapping AST nodes at nested paths
- yaml.visit traverses document AST nodes and removes targeted nodes when returning visit.REMOVE
- doc.toJS with mapAsMap: true converts YAML mapping structures to native JavaScript Map instances
Fichiers
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9