Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

compare-geojson

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compare-geojson

Compare a features new and old versions in GeoJSON

  • 2.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Compare-GeoJSON

Circle CI

Compare functions take as inputs the following:

  1. oldVersion - GeoJSON of the feature's old version
  2. newVersion - GeoJSON of the feature's new version
  3. callback - A function to call after processing.

Compare functions output the following:

  1. error - Error if any during processing or null.
  2. result - Object containing key value pairs representing findings of the compare function or an empty object.

A sample compare function would look something like this:

function checkPlaceRemoval(newVersion, oldVersion, callback) {
    var oldProps = oldVersion.properties;
    var newProps = newVersion.properties;
    var result = {};
    if (oldProps.hasOwnProperty('place') && !newProps.hasOwnProperty('place')) {
        result['result:place_removed'] = true;
    }
    return callback(null, result);
}

FAQs

Package last updated on 05 May 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc