Socket
Book a DemoInstallSign in
Socket

yaml-ast-parser-beta

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-ast-parser-beta

[![Build Status](https://travis-ci.org/mulesoft-labs/yaml-ast-parser.svg?branch=master)](https://travis-ci.org/mulesoft-labs/yaml-ast-parser)

0.0.33
latest
Source
npmnpm
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

yaml-ast-parser

Build Status

This is a fork of JS-YAML which supports parsing of YAML into AST.

In additional to parsing YAML to AST, it has following features:

  • restoration after the errors and reporting errors as a part of AST nodes.
  • built-in support for !include tag used in RAML

load method can be used to load the tree and returns YAMLNode root.

YAMLNode class is an ancestor for all node kinds. It's kind field determine node kind, one of Kind enum: SCALAR, MAPPING, MAP, SEQ, ANCHOR_REF or INCLUDE_REF. After node kind is determined, it can be casted to one of the YAMLNode descendants: YAMLScalar, YAMLMapping, YamlMap, YAMLSequence or YAMLAnchorReference.

startPosition and endPosition of YAMLNode class provide node range.

YAMLScalar has string value field.

YAMLMapping has YAMLScalar key and YAMLNode value fields.

YAMLSequence has YAMLNode[] items field.

YamlMap has YAMLMapping[] mappings field.

YAMLAnchorReference has string referencesAnchor and YAMLNode value.

Keywords

raml

FAQs

Package last updated on 08 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.