🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@mapbox/osm-compare

Package Overview
Dependencies
Maintainers
14
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/osm-compare

Compare a features new and old versions in GeoJSON

latest
Source
npmnpm
Version
9.4.1
Version published
Maintainers
14
Created
Source

osm-compare

Travis CI

Compare functions are small atomic functions that are designed identify what changed during a feature edit on OpenStreetMap. Compare functions can be broadly split up into two categories:

  • Property (tags) checking compare function
  • Geometry checking compare functions

Compare functions take as inputs the following:

  • oldVersion - GeoJSON of the feature's old version
  • newVersion - GeoJSON of the feature's new version

Compare functions output the following:

  • result - Object containing key value pairs representing findings of the compare function or an empty object.
# Format of compare function result where value can be primary data types or objects
{
    'result:comparator_name': value,
    'message': Any custom message which corresponds to the catch
}

# Format of compare function if no result, (default)
false

Install

# Install osm-compare from the Mapbox namespace.
npm install @mapbox/osm-compare

Docs

How do I build an npm package?

FAQs

Package last updated on 17 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts