Skip to content

Commit

Permalink
add createElement jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Jun 6, 2016
1 parent f9d259b commit 56365a0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/createElement.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
'use strict'

// JSX compatible

var Element = require('./Element')

/**
* JSX compatible API, use this function as pragma
* https://facebook.github.io/jsx/
*
* @param {string} name name of the element
* @param {object} attrs object of attribute key/value pairs
* @return {Element} Element
*/
module.exports = function createElement (name, attrs /*, child1, child2, ...*/) {
var el = new Element(name, attrs)

Expand Down

0 comments on commit 56365a0

Please sign in to comment.