An open API service indexing awesome lists of open source software.

https://github.com/wxmlfile/wxml-parser

A fast and tolerant wxml parser
https://github.com/wxmlfile/wxml-parser

wechat-mini-program wxml wxml-parser

Last synced: 10 months ago
JSON representation

A fast and tolerant wxml parser

Awesome Lists containing this project

README

          

## @wxml/parser

[![npm version](https://img.shields.io/npm/v/@wxml/parser)](https://www.npmjs.com/package/@wxml/parser)
[![CI Status](https://github.com/wxmlfile/wxml-parser/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/wxmlfile/wxml-parser/actions/workflows/ci.yml?query=branch%3Amain)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wxmlfile/wxml-parser/pulls)
[![Twitter Follow Author](https://img.shields.io/twitter/follow/s_chenlei)](https://twitter.com/chenleidev)

A fast and tolerant wxml parser

## Installation

```bash
## npm
$ npm install @wxml/parser --save-dev
## pnpm
$ pnpm add -D @wxml/parser
## yarn
$ yarn add @wxml/parser --dev
## cnpm (for china user)
$ cnpm install @wxml/parser --save-dev
```

## AST docs
Wanna try high level usage, check our [`AST` docs](https://github.com/wxmlfile/wxml-parser/blob/main/docs/ast.md) first !

## AST explorer


## AST explorer (sxzz/ast-explorer)


## Basic Usage

```javascript
const { parse } = require("@wxml/parser");
const AST = parse(`



{{mallName}}





`);
console.log("AST structure: ", AST);
```

## Try Play Online

Open [RunKit](https://npm.runkit.com/%40wxml%2Fparser) , and then happy coding !