Gathering detailed insights and metrics for @redocly/yaml-language-server-parser
Gathering detailed insights and metrics for @redocly/yaml-language-server-parser
Gathering detailed insights and metrics for @redocly/yaml-language-server-parser
Gathering detailed insights and metrics for @redocly/yaml-language-server-parser
npm install @redocly/yaml-language-server-parser
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
155 Commits
9 Forks
3 Watching
3 Branches
78 Contributors
Updated on 16 Feb 2023
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-54%
134
Compared to previous day
Last week
-4.9%
1,083
Compared to previous week
Last month
16.6%
3,507
Compared to previous month
Last year
78.8%
43,410
Compared to previous year
7
This is a maintained fork of YAML-AST-PARSER specifically for the YAML Language server.
If you are looking for the main YAML-AST-PARSER project you can find that here
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:
!include
tag used in RAMLThe type information below is relevant when using TypeScript, if using from JavaScript only the field/method information is relevant.
load
method can be used to load the tree and returns a YAMLNode
.
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 cast to one of the YAMLNode
descendants types:
YAMLScalar
, YAMLMapping
, YamlMap
, YAMLSequence
or YAMLAnchorReference
.class | important members |
---|---|
YAMLNode | startPosition and endPosition provide node range. |
YAMLScalar | string value field |
YAMLMapping | YAMLScalar key and YAMLNode value fields |
YAMLSequence | YAMLNode[] items field |
YamlMap | YAMLMapping[] mappings field |
YAMLAnchorReference | string referencesAnchor and YAMLNode value |
Scalars are one of the three main node types defined by YAML and are effectively leaf nodes.
There are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).
To help inspection of a YAMLScalar
to determine its datatype when a document uses the Core Schema, you can pass the YAMLScalar
to the determineScalarType
function. It will return an enum value indicating null
, bool
, int
, float
, or string
.
Once you know the type, there are also some helper functions to help read the value by passing them the string, value
: parseYamlBoolean
, parseYamlFloat
, and parseYamlInteger
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 15/23 approved changesets -- score normalized to 6
Reason
7 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is archived
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More