Comparing version 0.1.5 to 0.1.10
@@ -20,16 +20,5 @@ /** | ||
var elems = {}; | ||
var naked; | ||
/** | ||
* Since an array designates chidlren, we need this in order to identify an | ||
* array of sibling elements that have no parent. | ||
* | ||
* @param elements | ||
* @param text | ||
* @returns {*} | ||
*/ | ||
function naked(elements, text) { | ||
return elem('', elements, text); | ||
} | ||
/** | ||
* Take a jyt element and render it to an HTML string | ||
@@ -93,3 +82,3 @@ * @param elem | ||
// if no children or text, then close the tag | ||
if (elem.tag && !elem.children && !elem.text) { | ||
if (elem.tag && !elem.children && (elem.text === undefined || elem.text === null)) { | ||
@@ -127,3 +116,3 @@ // for self closing we just close it, else we add the end tag | ||
// if text, simply add it | ||
if (elem.text) { p.push(elem.text); } | ||
if (elem.text !== null && elem.text !== undefined) { p.push(elem.text); } | ||
@@ -191,2 +180,14 @@ // finally if a tag, add close tag | ||
/** | ||
* Since an array designates chidlren, we need this in order to identify an | ||
* array of sibling elements that have no parent. | ||
* | ||
* @param elements | ||
* @param text | ||
* @returns {*} | ||
*/ | ||
var naked = function naked(elements, text) { | ||
return elem('', elements, text); | ||
}; | ||
/** | ||
* Add all elements to the given scope | ||
@@ -193,0 +194,0 @@ * @param scope |
{ | ||
"name": "jyt", | ||
"version": "0.1.5", | ||
"version": "0.1.10", | ||
"description": "JavaScript Your Templates", | ||
@@ -22,5 +22,5 @@ "main": "lib/jyt.js", | ||
"devDependencies": { | ||
"gulp": "^3.8.9", | ||
"taste": "^0.1.5" | ||
"gulp": "^3.8.10", | ||
"taste": "^0.1.6" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24882
650