# @wxml/parser

> A fast and tolerant wxml parser

Latest version **0.4.0** (published 2022-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wxml/parser
pnpm add @wxml/parser
yarn add @wxml/parser
bun add @wxml/parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2022-03-24 |
| First published | 2021-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 532.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40 |
| Author | iChenLei |
| Maintainers | dhlolo, ichenlei |
| Keywords | wxml, parser, wechat, wexin, miniprogram |

## Links

- npm: https://www.npmjs.com/package/@wxml/parser
- Repository: https://github.com/wxmlfile/wxml-parser
- Homepage: https://github.com/wxmlfile/wxml-parser#readme
- Issues: https://github.com/wxmlfile/wxml-parser/issues
- npm.io page: https://npm.io/package/@wxml/parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2022-03-24
- 0.3.2 — 2022-01-15
- 0.3.1 — 2022-01-15
- 0.3.0 — 2021-11-15
- 0.2.0 — 2021-10-22
- 0.1.1 — 2021-10-20
- 0.1.0 — 2021-10-19
- 0.0.1 — 2021-10-19

## README

## @wxml/parser

[![npm version](https://img.shields.io/npm/v/@wxml/parser)](https://www.npmjs.com/package/@wxml/parser)
[![cnpm version](https://cnpmjs.org/badge/v/@wxml/parser.svg)](https://cnpmjs.org/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/s_chenlei)

A fast and tolerant wxml parser

## Installation

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

## Basic Usage

```javascript
const { parse } = require("@wxml/parser");
const AST = parse(`
  <view class="search-contianer">
    <view class="search" style="height:{{navHeight}}px;padding-top:{{navTop}}px">
      <view class="search-title" src="../../images/actLogo/ytlogo.png">
        {{mallName}}
      </view>
      <input
        placeholder-class="search-placeholder"
        type="text"
        placeholder="please enter keyword for search"
        disabled
        value="{{name}}"
        bindinput="bindinput"
        bindtap="goSearch">
      </input>
    </view>
  </view>
`);
console.log("AST structure: ", AST);
```

## Try Play Online

<a href="https://npm.runkit.com/%40wxml%2Fparser"><img src="https://funimg.pddpic.com/mobile_piggy/1b725d0e-5a50-4adc-adbd-793f9912cfd8.svg" width="100px" /></a>

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

---
_Source: https://npm.io/package/@wxml/parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
