Fast, flexible, and lean implementation of BBcode parser


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
01Sep 26, 2018Aug 14, 2018Minified + gzip package size for @hammad.fauz/parser in KB



fork of @bbob/parser

Parses BBCode and returns array AST tree

Valid for use with posthtml-render


import parse from '@hammad.fauz/parser'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
const ast = parse('[url=https://github.com]hello world![/url]', options)


        "tag": "url",
        "attrs": {
            "url": "https://github.com"
        "content": ["hello", " ", "world!"]

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.