Code coverage report for lib/$.create.js

Statements: 53.33% (8 / 15)      Branches: 50% (5 / 10)      Functions: 50% (1 / 2)      Lines: 53.33% (8 / 15)      Ignored: none     

All files » lib/ » $.create.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34    1   1       1 1 1             1       1                   1    
'use strict';
 
var $ = require('./$');
 
$.createElement = /** @function 
                  * @param element 
                  * @param attributes 
                  * @param {...*} children */function (element, attributes) {
    Eif (typeof element === 'string') {
        element = $.create(element);
        Iif (attributes != null) {
            element.setAttributes(attributes);
        }
    } else {
        element = element(attributes);
    }
 
    for (var _len = arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        children[_key - 2] = arguments[_key];
    }
 
    Iif (children && children.length) {
        children.forEach(function (child) {
            if (typeof child === 'string') {
                element.appendText(child);
            } else {
                element.append(child);
            }
        });
    }
 
    return element;
};
//# sourceMappingURL=$.create.js.map