Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Feb 21, 2024 via pnpm

yamljs 0.3.0

Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.
Package summary
Share
0
issues
3
licenses
7
ISC
6
MIT
1
BSD-3-Clause
Package created
4 Aug 2012
Version published
24 Jun 2017
Maintainers
1
Total deps
14
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
fs.realpath@1.0.0
glob@7.2.3
inflight@1.0.6
inherits@2.0.4
minimatch@3.1.2
once@1.4.0
wrappy@1.0.2

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
6 Packages, Including:
argparse@1.0.10
balanced-match@1.0.2
brace-expansion@1.1.11
concat-map@0.0.1
path-is-absolute@1.0.1
yamljs@0.3.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
sprintf-js@1.0.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of yamljs 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
argparse1.0.1029.06 kBMIT
prod
glob7.2.315.08 kBISC
prod

Visualizations

Frequently Asked Questions

What does yamljs do?

Yamljs is a standalone JavaScript YAML 1.2 parser and encoder that possesses broad compatibility across node.js and all major browsers. Not only does it enable the conversion between YAML and JavaScript native objects, but it also provides command-line YAML/JSON conversion tools.

How do you use yamljs?

To use Yamljs in your JavaScript or Node.js project, you'll first need to import it. For browser-based implementations, link the yaml.js script in your HTML page:

<script type="text/javascript" src="yaml.js"></script>

In a Node.js environment, install the yamljs package via npm and require it in your file:

npm install yamljs
YAML = require('yamljs');

Here's how you can use Yamljs to parse a YAML string to a native JavaScript object:

nativeObject = YAML.parse(yamlString);

And to convert a native JavaScript object into a YAML string:

yamlString = YAML.stringify(nativeObject, 4);

If you want to load a YAML file directly, you can do so with the YAML.load function:

nativeObject = YAML.load('myfile.yml');

Moreover, Yamljs can be utilized for command-line YAML/JSON conversions. Install it as a global npm module for easy command-line access:

npm install -g yamljs

This will offer you two commands: yaml2json and json2yaml, which allows for easy conversion between YAML and JSON formats respectively.

Where are the yamljs docs?

The documentation for Yamljs can be primarily found in its GitHub source (git://github.com/jeremyfa/yaml.js.git). This includes necessary details about its functioning, compatibility, usage, and command-line tools. For more detailed help on its CLI tools, you can also look up the --help option with yaml2json -h or json2yaml -h directly in your command line environment.