mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
(minor) tidying up
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
require('./tree').find = function (obj, fun) {
|
||||
(function (tree) {
|
||||
|
||||
tree.find = function (obj, fun) {
|
||||
for (var i = 0, r; i < obj.length; i++) {
|
||||
if (r = fun.call(obj, obj[i])) { return r }
|
||||
}
|
||||
return null;
|
||||
};
|
||||
require('./tree').jsify = function (obj) {
|
||||
tree.jsify = function (obj) {
|
||||
if (Array.isArray(obj.value) && (obj.value.length > 1)) {
|
||||
return '[' + obj.value.map(function (v) { return v.toCSS(false) }).join(', ') + ']';
|
||||
} else {
|
||||
return obj.toCSS(false);
|
||||
}
|
||||
};
|
||||
|
||||
})(require('./tree'));
|
||||
|
||||
@@ -121,7 +121,7 @@ tree.Ruleset.prototype = {
|
||||
if (context.length === 0) {
|
||||
paths = this.selectors.map(function (s) { return [s] });
|
||||
} else {
|
||||
this.joinSelectors( paths, context, this.selectors );
|
||||
this.joinSelectors(paths, context, this.selectors);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user