Registry / devops / impact-map-endpoint

impact-map-endpoint

JSON →
library1.2.0jsnpmunverified

A utility for determining TopoJSON endpoints for nodes in a rollup tree structure, used as a dependency within the 832 impact mapping framework. The current version is 1.2.0. It is a niche internal package with low release activity. Key differentiator: tightly coupled with the 832 project's rollup tree model for spatial data.

npm install impact-map-endpoint
INSTALL
IMPORT
SIG · IMPACT-MAP-ENDPOIN
I
impact-map-endpoint
devopsjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import impactMapEndpoint from 'impact-map-endpoint'
const impactMapEndpoint = require('impact-map-endpoint')
Package is ESM-only since v1.0
getEndpoint
import { getEndpoint } from 'impact-map-endpoint'
const { getEndpoint } = require('impact-map-endpoint')
Named export available
type Endpoint
import type { Endpoint } from 'impact-map-endpoint'
TypeScript type import

Shows basic usage to compute TopoJSON endpoint for a node in a rollup tree.

import impactMapEndpoint from 'impact-map-endpoint'; const endpoint = impactMapEndpoint({ node: { id: 'region', parent: null, children: ['subregion1', 'subregion2'] }, rollup: { regions: ['subregion1', 'subregion2'] } }); console.log(endpoint);
Debug
Known issues
breakingAPI changed in v1.0: output format changed from {endpoint: {...}} to flat object with coordinates property.
fix
Update consumer code to access endpoint.coordinates instead of endpoint.endpoint.coordinates.
affects: >=1.0
deprecatedOption 'tolerance' was deprecated in v1.0 and removed in v1.1.
fix
Remove tolerance option; no replacement.
affects: >=1.0
gotchaThe input rollup tree must be a flat object with node references; circular references cause infinite recursion.
fix
Ensure rollup tree has no circular references before passing to the function.
affects: >=0.5
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'children')
Node object missing 'children' property when parent is null.
fix
Ensure root node has children: [] even if no children.
Error: Unknown node type 'none'
Node has type property not recognized by the library.
fix
Set node.type to one of: 'region', 'point', 'line', 'polygon'.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
impact-map-endpoint — npm install impact-map-endpoint · libregistry