Skip to content

y3un9/tinyparse

Repository files navigation

tinyparse

Make use of Template literals (template strings) `${}` and Function constructor(arg1, arg2, ... argN, functionBody) to build a super simple and native parser.

Usage

import { tinyparse } from 'tinyparse'

const template = '<div>${text}${this.name}</div>'
const data = { text: 'Hello, ' }
const thisObj = { name: 'tinyparse!' }

tinyparse(template, data, thisObj) // '<div>Hello, tinyparse!</div>'

About

Super simple JavaScript native template parser!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published