Gathering detailed insights and metrics for yaml-js
Gathering detailed insights and metrics for yaml-js
Gathering detailed insights and metrics for yaml-js
Gathering detailed insights and metrics for yaml-js
npm install yaml-js
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.8
Supply Chain
95.6
Quality
75.8
Maintenance
100
Vulnerability
100
License
JavaScript (73.77%)
CoffeeScript (26.23%)
Total Downloads
81,910,459
Last Day
33,868
Last Week
173,041
Last Month
802,325
Last Year
8,925,445
68 Stars
117 Commits
18 Forks
6 Watchers
2 Branches
5 Contributors
Updated on Jan 28, 2023
Minified
Minified + Gzipped
Latest Version
0.3.1
Package Id
yaml-js@0.3.1
Size
117.50 kB
NPM Version
6.11.3
Node Version
12.12.0
Published on
Sep 19, 2021
Cumulative downloads
Total Downloads
Last Day
44%
33,868
Compared to previous day
Last Week
-1.5%
173,041
Compared to previous week
Last Month
-6.7%
802,325
Compared to previous month
Last Year
-6%
8,925,445
Compared to previous year
8
This project is now abandoned and the repository archived. The license should allow you to fork and do whatever you want, in case you cannot migrate to a different YAML library.
Fun history fact: when I made the port there wasn't another pure JS YAML parser - the initial commit for this repo was just a couple of days before the initial release of js-yaml!
yaml-js is a YAML loader and dumper, ported pretty much line-for-line from PyYAML. The goal for the project is to maintain a reliable and specification-complete YAML processor in pure Javascript, with CoffeeScript source code. You can try it out here.
Loading is stable and well-used, and passes the yaml-spec test suite, which fairly thoroughly covers the YAML 'core' schema.
Dumping is present but very lightly tested (auto-tests only, no significant usage). The output should therefore be correct YAML, however formatting is currently entirely untested.
npm install yaml-js
1// Server (e.g. node.js) 2var yaml = require('yaml-js'); 3 4// Browser 5// <script src='yaml.min.js'></script> 6 7// Loading 8console.log(yaml.load( 9 '---\n' + 10 'phrase1:\n' + 11 ' - hello\n' + 12 ' - &world world\n' + 13 'phrase2:\n' + 14 ' - goodbye\n' + 15 ' - *world\n' + 16 'phrase3: >\n' + 17 ' What is up\n' + 18 ' in this place.' 19)); 20// { phrase1: [ 'hello', 'world' ], 21// phrase2: [ 'goodbye', 'world' ], 22// phrase3: 'What is up in this place.' } 23 24// Dumping 25console.log(yaml.dump({ 26 phrase1: [ 'hello', 'world' ], 27 phrase2: [ 'goodbye', 'world' ], 28 phrase3: 'What is up in this place.' 29})); 30// phrase1: [hello, world] 31// phrase2: [goodbye, world] 32// phrase3: What is up in this place.
Method | Description |
---|---|
load | Parse the first YAML document in a stream and produce the corresponding Javascript object. |
dump | Serialize a Javascript object into a YAML stream. |
load_all | Parse all YAML documents in a stream and produce the corresponing Javascript objects. |
dump_all | Serialize a sequence of Javascript objects into a YAML stream. |
scan | Scan a YAML stream and produce tokens. |
parse | Parse a YAML stream and produce events. |
compose | Parse the first YAML document in a stream and produce the corresponding representation tree. |
compose_all | Parse all YAML documents in a stream and produce corresponding representation trees. |
emit | Emit YAML parsing events into a stream. |
serialize | Serialize a representation tree into a YAML stream. |
serialize_all | Serialize a sequence of representation trees into a YAML stream. |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
7 existing vulnerabilities detected
Details
Reason
project is archived
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
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 2025-05-05
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