Need private packages and team management tools?Check out npm Teams »

neptunus

1.4.0 • Public • Published

neptunus

Make your GPX files match trails easily.

Installing

Using npm:

$ npm install neptunus

Using yarn:

$ yarn add neptunus

Launching

Import the module

You could import the module using import syntax.

import Neptunus from 'neptunus'

Or using require syntax.

const Neptunus = require('neptunus').default

Creating an instance

You have to create a new instance of neptunus with a mapbox access token.

const instance = new Neptunus({ mapboxAccessToken: 'YOUR_MAPBOX_TOKEN_HERE' })

Neptunus.match(path)

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())

Promises

neptunus depends on a native ES6 Promise implementation to be supported. If your environment doesn't support ES6 Promises, you can polyfill.

TypeScript

neptunus includes TypeScript definitions.

License

MIT

Install

npm i neptunus

DownloadsWeekly Downloads

2

Version

1.4.0

License

MIT

Unpacked Size

47.2 kB

Total Files

23

Last publish

Collaborators

  • avatar