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

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

https://bitbucket.org/jorritposthuma/inventory-counter-mobile
JavaScript | 24 lines | 22 code | 2 blank | 0 comment | 2 complexity | 6a009a5b26cf9da2e75df41987e6587e MD5 | raw file
Possible License(s): MIT, Apache-2.0
 1(function (tree) {
 2
 3tree.Value = function (value) {
 4    this.value = value;
 5    this.is = 'value';
 6};
 7tree.Value.prototype = {
 8    eval: function (env) {
 9        if (this.value.length === 1) {
10            return this.value[0].eval(env);
11        } else {
12            return new(tree.Value)(this.value.map(function (v) {
13                return v.eval(env);
14            }));
15        }
16    },
17    toCSS: function (env) {
18        return this.value.map(function (e) {
19            return e.toCSS(env);
20        }).join(env.compress ? ',' : ', ');
21    }
22};
23
24})(require('../tree'));