PageRenderTime 23ms CodeModel.GetById 21ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/app/node_modules/less/lib/less/tree.js

https://bitbucket.org/jorritposthuma/inventory-counter-mobile
JavaScript | 17 lines | 15 code | 2 blank | 0 comment | 5 complexity | 9f8c64c796070fdcb8181ecb28286884 MD5 | raw file
Possible License(s): MIT, Apache-2.0
 1(function (tree) {
 2
 3tree.find = function (obj, fun) {
 4    for (var i = 0, r; i < obj.length; i++) {
 5        if (r = fun.call(obj, obj[i])) { return r }
 6    }
 7    return null;
 8};
 9tree.jsify = function (obj) {
10    if (Array.isArray(obj.value) && (obj.value.length > 1)) {
11        return '[' + obj.value.map(function (v) { return v.toCSS(false) }).join(', ') + ']';
12    } else {
13        return obj.toCSS(false);
14    }
15};
16
17})(require('./tree'));