Files
less.js/lib/less/functions/function-caller.js
rjgotten d119e01807 Scoped @import (plugin) functions loading
- Limited @import (plugin) support to add/addMultiple of functions
- Altered @import (plugin) loading to support browser
- Support proper closure scoping of @import (plugin) loaded functions
2015-03-05 15:55:37 +01:00

17 lines
482 B
JavaScript

var functionCaller = function(name, context, index, currentFileInfo) {
this.name = name.toLowerCase();
this.index = index;
this.context = context;
this.currentFileInfo = currentFileInfo;
this.func = context.frames[0].functionRegistry.get(this.name);
};
functionCaller.prototype.isValid = function() {
return Boolean(this.func);
};
functionCaller.prototype.call = function(args) {
return this.func.apply(this, args);
};
module.exports = functionCaller;