MCPcopy Create free account
hub / github.com/microsoft/SandDance / topojson

Function topojson

docs/app/js/sanddance-app.js:109113–109128  ·  view source on GitHub ↗
(data, format5)

Source from the content-addressed store, hash-verified

109111 exterior: (a, b)=>a === b
109112};
109113function topojson(data, format5) {
109114 let method, object, property, filter;
109115 data = json(data, format5);
109116 if (format5 && format5.feature) {
109117 method = (0, _topojsonClient.feature);
109118 property = format5.feature;
109119 } else if (format5 && format5.mesh) {
109120 method = (0, _topojsonClient.mesh);
109121 property = format5.mesh;
109122 filter = filters[format5.filter];
109123 } else (0, _vegaUtil.error)("Missing TopoJSON feature or mesh parameter.");
109124 object = (object = data.objects[property]) ? method(data, object, filter) : (0, _vegaUtil.error)("Invalid TopoJSON object: " + property);
109125 return object && object.features || [
109126 object
109127 ];
109128}
109129topojson.responseType = "json";
109130const format = {
109131 dsv: dsv,

Callers

nothing calls this directly

Calls 2

jsonFunction · 0.70
methodFunction · 0.70

Tested by

no test coverage detected