jsx-html

0.0.25 • Public • Published

jsx-html

Convert jsx to html string

Installation

npm install jsx-html --save

Tests

npm install
npm test

Dependencies

  • recast: JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • eslint: An AST-based pattern checker for JavaScript.
  • jsdoc-to-markdown: Generates markdown API documentation from jsdoc annotated source code
  • mocha: simple, flexible, fun test framework

License

MIT

jsxToHtml(code) ⇒ string

Convert JSX element in ecmascript code string to double quoted html string in the code. Forked from angular-jsx https://github.com/thesam/angular-jsx

Kind: global function
Returns: string - double quoted html strings converted from JSX element in ecmascript.

Param Type Description
code string jsx element contained in ecmascript code string.

Example

let jsxHtml = require('jsx-html');
let code = 'let template = <div>hello</div>'
jsxToHtml(code)
// returns 'let template = "<div>hello</div>"'

Readme

Keywords

none

Package Sidebar

Install

npm i jsx-html

Weekly Downloads

0

Version

0.0.25

License

MIT

Last publish

Collaborators

  • i4han