/usr/lib/nodejs/ltx/lib/createElement.js is in node-ltx 2.6.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 'use strict'
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)
for (var i = 2; i < arguments.length; i++) {
var child = arguments[i]
if (child) el.cnode(child)
}
return el
}
|