@maptalks/function-type
Advanced tools
+11
-10
| /*eslint-disable no-var, prefer-const*/ | ||
| function createFunction(parameters, defaultType) { | ||
| var fun; | ||
| var isFeatureConstant, isZoomConstant; | ||
| if (!isFunctionDefinition(parameters)) { | ||
| fun = function () { return parameters; }; | ||
| fun.isFeatureConstant = true; | ||
| fun.isZoomConstant = true; | ||
| isFeatureConstant = true; | ||
| isZoomConstant = true; | ||
@@ -53,4 +53,4 @@ } else { | ||
| }; | ||
| fun.isFeatureConstant = false; | ||
| fun.isZoomConstant = false; | ||
| isFeatureConstant = false; | ||
| isZoomConstant = false; | ||
@@ -62,4 +62,4 @@ } else if (zoomDependent) { | ||
| }; | ||
| fun.isFeatureConstant = true; | ||
| fun.isZoomConstant = false; | ||
| isFeatureConstant = true; | ||
| isZoomConstant = false; | ||
| } else { | ||
@@ -70,7 +70,8 @@ fun = function (zoom, feature) { | ||
| }; | ||
| fun.isFeatureConstant = false; | ||
| fun.isZoomConstant = true; | ||
| isFeatureConstant = false; | ||
| isZoomConstant = true; | ||
| } | ||
| } | ||
| fun.isZoomConstant = isZoomConstant; | ||
| fun.isFeatureConstant = isFeatureConstant; | ||
| return fun; | ||
@@ -77,0 +78,0 @@ } |
+1
-1
| { | ||
| "name": "@maptalks/function-type", | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", | ||
| "main": "./index.js", | ||
@@ -5,0 +5,0 @@ "module": "./index.js", |
13844
0.71%276
1.1%