mirror of
https://github.com/less/less.js.git
synced 2026-01-23 06:07:56 -05:00
18 lines
519 B
JavaScript
18 lines
519 B
JavaScript
var functionRegistry = require("./function-registry");
|
|
|
|
var functionCaller = function(name, context, index, currentFileInfo) {
|
|
this.name = name.toLowerCase();
|
|
this.func = functionRegistry.get(this.name);
|
|
this.index = index;
|
|
this.context = context;
|
|
this.currentFileInfo = currentFileInfo;
|
|
};
|
|
functionCaller.prototype.isValid = function() {
|
|
return Boolean(this.func);
|
|
};
|
|
functionCaller.prototype.call = function(args) {
|
|
return this.func.apply(this, args);
|
|
};
|
|
|
|
module.exports = functionCaller;
|