MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / validateFunctions

Function validateFunctions

src/common/style/CartoCSS.js:4147–4162  ·  view source on GitHub ↗
(value, selector)

Source from the content-addressed store, hash-verified

4145 },
4146 validValue: function (env, selector, value) {
4147 function validateFunctions(value, selector) {
4148 if (value.value[0].is === 'string') {return true;}
4149 for (var i in value.value) {
4150 for (var j in value.value[i].value) {
4151 if (value.value[i].value[j].is !== 'call') {return false;}
4152 var f = find(this.selector(selector).functions, function (x) {//NOSONAR
4153 return x[0] === value.value[i].value[j].name;
4154 });
4155 if (!(f && f[1] === -1)) {
4156 // This filter is unknown or given an incorrect number of arguments
4157 if (!f || f[1] !== value.value[i].value[j].args.length) {return false;}
4158 }
4159 }
4160 }
4161 return true;
4162 }
4163
4164 function validateKeyword(value, selector) {
4165 if (typeof this.selector(selector).type === 'object') {

Callers 1

CartoCSS.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected