MCPcopy
hub / github.com/zcreativelabs/react-simple-maps / getMesh

Function getMesh

src/utils.js:36–50  ·  view source on GitHub ↗
(geographies)

Source from the content-addressed store, hash-verified

34}
35
36export function getMesh(geographies) {
37 const isTopojson = geographies.type === "Topology"
38 if (!isTopojson) return null
39 const outline = mesh(
40 geographies,
41 geographies.objects[Object.keys(geographies.objects)[0]],
42 (a, b) => a === b
43 )
44 const borders = mesh(
45 geographies,
46 geographies.objects[Object.keys(geographies.objects)[0]],
47 (a, b) => a !== b
48 )
49 return { outline, borders }
50}
51
52export function prepareMesh(outline, borders, path) {
53 return outline && borders

Callers 1

useGeographiesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…