Sha256: 3d9742d43d7ffb2e325b322119e1a39ce4fc8714ae98e5d67a6c98e0da3ab68d

Contents?: true

Size: 548 Bytes

Versions: 2

Compression:

Stored size: 548 Bytes

Contents

// add the functions that functions.less test expects to be exposed, see runner-main-options.js
module.exports = {
  registerCustomFunctions: function (less, functionRegistry) {
    functionRegistry.addMultiple({
      add: function(a, b) {
        return new less.tree.Dimension(a.value + b.value);
      },

      increment: function(a) {
        return new less.tree.Dimension(a.value + 1);
      },

      _color: function(str) {
        if(str.value == 'evil red') {
          return new less.tree.Color('600')
        }
      }
    })
  }
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
less-execjs-2.6.0.4 spec/support/less.js.tests-custom-functions.js
less-execjs-2.6.0.3 spec/support/less.js.tests-custom-functions.js