toFunctor

webix.toFunctor(str, scope)

webix.toFunctor helper.

Please look into the linked official documentation.

External references

Official documentation page.

Code

1
2
3
4
5
6
7
8
9
webix.toFunctor=function(str, scope){
    if (typeof(str)=="string"){
        var method = str.replace("()","");
        if (scope && scope[method]) return scope[method];
        return window[method] || eval(str);
    }
    return str;
};
/*checks where an object is instance of Array*/