Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed render functions as they add nothing useful

  • Loading branch information...
commit 7dafbddf0e0713d59f49385553c6a9aaf72316da 1 parent 1b19fde
@rudenoise authored
Showing with 0 additions and 24 deletions.
  1. +0 −5 lmd.js
  2. +0 −10 lmdTests.js
  3. +0 −9 lms.js
View
5 lmd.js
@@ -23,11 +23,6 @@ var lmd = (function () {
}
return false;
};
- lm.render = function (tplFun, data) {
- // accepts a tplFun/function and data/object
- // returns the output from the data passed through the tplFun
- return q.isF(tplFun) && q.isO(data) ? tplFun(data) : false;
- };
// START PRIVATE
parseArr = function (arr) {
// loop arr and attach to document fragment, then return document fragment
View
10 lmdTests.js
@@ -33,13 +33,3 @@ test("Attributes", function () {
}
}]).firstChild.style.border === '1px solid', "set style attribute via object");
});
-test("Render", function () {
- ok(q.isF(lmd.render), "render exists");
- ok((lmd.render() && lmd.render(12, "")) === false, "rejects no/bad args");
- ok(q.isDOM(lmd.render(function (obj) {
- return lmd(['p', obj.text]);
- }, {text: 'hello'})), "returns dom for correct tpl and data");
- ok(lmd.render(function (obj) {
- return lmd(['p', obj.text]);
- }, {text: 'hello'}).firstChild.innerHTML === "hello", "returns dom for correct tpl and data with correct values");
-});
View
9 lms.js
@@ -23,11 +23,6 @@ var lms = (function () {
}
return rtn.join('');
};
- lm.render = function (tplFun, data) {
- // accepts a tplFun/function and data/object
- // returns the output from the data passed through the tplFun
- return q.isF(tplFun) && q.isO(data) ? tplFun(data) : false;
- };
// private
re = new RegExp("^[a-zA-Z]((?![ ]).)*$");// match valid tag name
parseTag = function (arr) {
@@ -96,10 +91,6 @@ var lms = (function () {
// return true id u q.is undefined
return typeof (u) === "undefined";
};
- q.isF = function (f) {
- // q.is f a function?
- return typeof(f) === "function";
- };
q.isO = function (o) {
// q.is "o" an Object?
return q.isU(o) === false && q.toS(o) === "[object Object]" &&
Please sign in to comment.
Something went wrong with that request. Please try again.