Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prettier/yaml-unist-parser
A YAML parser that produces output compatible with unist
https://github.com/prettier/yaml-unist-parser
unist yaml
Last synced: 3 months ago
JSON representation
A YAML parser that produces output compatible with unist
- Host: GitHub
- URL: https://github.com/prettier/yaml-unist-parser
- Owner: prettier
- License: mit
- Created: 2018-05-18T14:44:15.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T17:23:49.000Z (12 months ago)
- Last Synced: 2024-04-14T01:48:40.797Z (9 months ago)
- Topics: unist, yaml
- Language: TypeScript
- Homepage:
- Size: 838 KB
- Stars: 22
- Watchers: 6
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# yaml-unist-parser
[![npm](https://img.shields.io/npm/v/yaml-unist-parser.svg)](https://www.npmjs.com/package/yaml-unist-parser)
[![build](https://img.shields.io/github/workflow/status/prettier/yaml-unist-parser/CI)](https://github.com/prettier/yaml-unist-parser/actions?query=workflow%3ACI+branch%3Amain)
[![coverage](https://img.shields.io/codecov/c/github/prettier/yaml-unist-parser/main.svg)](https://codecov.io/gh/prettier/yaml-unist-parser)A YAML parser that produces output compatible with [unist](https://github.com/syntax-tree/unist)
[Changelog](https://github.com/ikatyang/yaml-unist-parser/blob/master/CHANGELOG.md)
## Features
- better node positioning
- better comment attaching
- [unist-compatible AST](https://github.com/ikatyang/yaml-unist-parser/blob/master/src/types.ts)## Install
```sh
# using npm
npm install --save yaml-unist-parser# using yarn
yarn add yaml-unist-parser
```## Usage
```ts
import { parse } from "yaml-unist-parser";const ast = parse(`
- hello
- world
`);
```## Development
```sh
# lint
yarn run lint# build
yarn run build# test
yarn run test
```## License
MIT © [Ika](https://github.com/ikatyang)