npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mega-gps

v1.0.5

Published

MegaGPS is a Node.js library for interacting with the MEGA-GPS service. It allows you to obtain calculated mileage values for a selected time interval and the current coordinates of objects.

Downloads

33

Readme

MegaGPS

Опис

MegaGPS — це TypeScript/JavaScript бібліотека для інтеграції з GPS-трекерами, що працюють через сервіс MegaGPS. Вона дозволяє отримувати дані про трекери, їхнє поточне положення, пробіг та треки за період. Бібліотека спрощує роботу з API MegaGPS, забезпечуючи зручний доступ до інформації про транспортні засоби, їхній рух та стан датчиків у реальному часі.


Встановлення

npm install mega-gps

Використання

import MegaGPS from 'mega-gps';

const megaGPS = new MegaGPS({ key: 'your_api_key' });

// Отримати поточні дані трекера
const current = await megaGPS.currentData(trackerId);

// Отримати список всіх трекерів
const trackers = await megaGPS.allTrackers();

// Отримати пробіг за період
const mileage = await megaGPS.mileage(trackerId, fromDate, toDate);

// Отримати трек за період
const track = await megaGPS.track(trackerId, fromDate, toDate);

API

Конструктор

new MegaGPS({ key: string })
  • key — API ключ (обов'язково).

Методи

  • currentData(trackerId: number): Promise<TCurrentDataOut>
    • Повертає поточне положення та стан датчиків трекера.
  • allTrackers(): Promise<TCar[]>
    • Повертає список всіх трекерів.
  • mileage(trackerId: number, fromDate: number, toDate: number): Promise<TMileage>
    • Повертає пробіг трекера за період.
  • track(trackerId: number, fromDate: number, toDate: number): Promise<TTrackDataOut[]>
    • Повертає трек трекера за період.

Типи

Типи даних описані у папці src/types/.


Вимоги

  • Node.js >= 14
  • TypeScript (для типізації)

Ліцензія

MIT


MegaGPS (English)

Description

MegaGPS is a TypeScript/JavaScript library for integrating with GPS trackers managed via the MegaGPS service. It allows you to retrieve tracker data, current positions, mileage, and tracks for a given period. The library simplifies interaction with the MegaGPS API, providing convenient access to vehicle information, movement history, and real-time sensor states.


Installation

npm install mega-gps

Usage

import MegaGPS from 'mega-gps';

const megaGPS = new MegaGPS({ key: 'your_api_key' });

// Get current tracker data
const current = await megaGPS.currentData(trackerId);

// Get all trackers
const trackers = await megaGPS.allTrackers();

// Get mileage for a period
const mileage = await megaGPS.mileage(trackerId, fromDate, toDate);

// Get track for a period
const track = await megaGPS.track(trackerId, fromDate, toDate);

API

Constructor

new MegaGPS({ key: string })
  • key — API key (required).

Methods

  • currentData(trackerId: number): Promise<TCurrentDataOut>
    • Returns current position and sensor state for a tracker.
  • allTrackers(): Promise<TCar[]>
    • Returns a list of all trackers.
  • mileage(trackerId: number, fromDate: number, toDate: number): Promise<TMileage>
    • Returns mileage for a tracker within a period.
  • track(trackerId: number, fromDate: number, toDate: number): Promise<TTrackDataOut[]>
    • Returns track data for a tracker within a period.

Types

Data types are described in the src/types/ folder.


Requirements

  • Node.js >= 14
  • TypeScript (for typings)

License

MIT