Socket
Socket
Sign inDemoInstall

geojsonhint

Package Overview
Dependencies
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geojsonhint

validate and sanity-check geojson files


Version published
Weekly downloads
2.8K
increased by7.2%
Maintainers
5
Weekly downloads
 
Created
Source

Build Status

geojsonhint: complete standards-based validation for geojson

A lint tool for the GeoJSON standard. geojsonhint is written to the standard, with no missing or additional opinions about structure.

Thanks to jsonlint-lines, GeoJSON that is also not valid JSON will return informative, line-oriented parsing errors.

api

errors = geojsonhint.hint(fileAsString)

Lint a file - given as a string - with the GeoJSON expectations baked in. An example of the output:

[{
  "message": "\"features\" property should be an array, but is an object instead",
  "line": 1
}]

use it

as a library

npm install --save geojsonhint

as a web library

curl https://raw.github.com/mapbox/geojsonhint/master/geojsonhint.js > geojsonhint.js

binary

Install:

npm install -g geojsonhint
➟ geojsonhint
Usage: geojsonhint FILE.geojson

Options:
  --json  output json-formatted data for hints
➟ geojsonhint test.geojson
line 9, each element in a position must be a number

developing

Tests:

npm test

Building the browser version:

npm install -g browserify
make

See Also

Keywords

FAQs

Package last updated on 20 Aug 2014

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