0.0.25 • Published 7 years ago

jsx-html v0.0.25

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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.

ParamTypeDescription
codestringjsx 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>"'
0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago