Make your GPX files match trails easily.
Using npm:
$ npm install neptunus
Using yarn:
$ yarn add neptunus
You could import the module using import syntax.
import Neptunus from 'neptunus'
Or using require syntax.
const Neptunus = require('neptunus').default
You have to create a new instance of neptunus with a mapbox access token.
const instance = new Neptunus({ mapboxAccessToken: 'YOUR_MAPBOX_TOKEN_HERE' })
Then, open a GPX file and pass it to neptunus as a string.
const file = await readFile('./assets/thabor.gpx', 'utf-8')
const output = await instance.match(file.toString())
neptunus depends on a native ES6 Promise implementation to be supported. If your environment doesn't support ES6 Promises, you can polyfill.
neptunus includes TypeScript definitions.