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 🙏

© 2025 – Pkg Stats / Ryan Hefner

js-geofs

v2.1.0

Published

An abstraction layer for the GeoFS API (credit to iL0g1c).

Readme

js-geofs

npm version License

An abstraction layer for the GeoFS API (credit to iL0g1c for MapAPI & MultiplayerAPI).


Table of Contents

  1. Installation
  2. Components
  3. Contributing
  4. License

Installation

  1. Create your project directory and select it:

    mkdir example-dir
    cd /path/to/example-dir
  2. Install the package:

    npm install js-geofs
  3. You're all set! Read the Components section to find out more.


Components

MapAPI

The MapAPI provides access to GeoFS's map data, which includes the user's:

  • ID
  • Account ID
  • Aircraft ID
  • Callsign
  • Grounded status and airspeed
  • Coordinates
  • Vectors
  • Time

References

ECMAScript:

import { MapAPI } from "js-geofs";
const myAPI = new MapAPI();

CommonJS:

const geofs = require("js-geofs");
const myAPI = new geofs.MapAPI();

Methods

  • getUsers:

    • Parameters:
      • foos (Boolean), optional:
        • If true, returns only foos.
        • If false, returns only non-foos.
        • If not provided, returns all users.
    • Returns: List of users as per specifications.
  • responseList.get:

    • Gets: Response history.
    • Parameters: N/A.
    • Returns: Array of all previous results of getUsers calls.
  • responseList.reset:

    • Clears responseList.
    • Parameters: N/A.
    • Returns: undefined.
  • responseList.enable, responseList.disable, responseList.toggle:

    • Enables, disables, or toggles usage of the responseList.
    • Parameters: N/A.
    • Returns: undefined.

MultiplayerAPI

The MultiplayerAPI provides access to GeoFS's multiplayer data, including:

  • Chat data
  • More detailed positioning information

References

ECMAScript:

import { MultiplayerAPI } from "js-geofs";
const myAPI = new multiplayerAPI(sessionID, accountID);

CommonJS:

const geofs = require("js-geofs");
const myAPI = new multiplayerAPI(sessionID, accountID);
  • The accountID value can be found here.
  • The sessionID value can be found in the console (see below).

Retrieving sessionID

Sign in to your account here{:target="_blank"} and open the console with ctrl+shift+j. Then, paste this code:

const cookies = document.cookie.split(';');
const sessionIdCookie = cookies.find(cookie => cookie.trim().startsWith('PHPSESSID='));
const sessionId = sessionIdCookie ? sessionIdCookie.split('=')[1] : null;
console.log(sessionId);

This will output a session ID, which is a random string.

Note: session IDs can be exploited to gain access to your GeoFS account. This package needs it in order to access chat messages through MultiplayerAPI. Do not share your session ID with anyone unless you know what you're doing.

To make a handshake with the server:

myAPI.handshake();

Methods

  • sendMsg:

    • Sends a specified message to GeoFS chat.
    • Parameters:
      • msg (String), required: The message to send in GeoFS chat.
    • Returns: undefined.
  • getMessages:

    • Pulls the most recent messages from the server.
    • Parameters: N/A.
    • Returns: Array of chat messages or null if the connection was unsuccessful.
  • coords:

    • Either returns current coordinates or changes them.
    • Parameters:
      • coords (Array of 6 numbers), optional:
        • co[0] latitude
        • co[1] longitude
        • co[2] altitude in meters
        • co[3] vertical speed in meters
        • Last two can be 0.
    • Returns: undefined if parameter is passed or an array of current coords if not.

GeoAPI

The GeoAPI allows you to geocode a specified query.

References

ECMAScript:

import { GeoAPI } from "js-geofs";
const myAPI = new GeoAPI();

CommonJS:

const geofs = require("js-geofs");
const myAPI = new geofs.GeoAPI();

Methods

  • query:
    • Sends a request to GeoFS's geocoding backend and returns the response if found.
    • Parameters:
      • toQuery (String), required: String to query/encode in the URL.
    • Returns: Response object or undefined if it couldn't be geocoded.

WeatherAPI

References

ECMAScript:

import { WeatherAPI } from "js-geofs";
const myAPI = new WeatherAPI();

CommonJS:

const geofs = require("js-geofs");
const myAPI = new geofs.WeatherAPI();

Methods

  • query:
    • Queries GeoFS's weather backend with the specified ICAO(s) and returns the airport's METAR if found.
    • Parameters:
      • toQuery (String), required: String to query/encode in the URL.
    • Returns: Response object or undefined if no matching METAR was found.

Contributing

Contributions are welcome! If you don't know how to contribute, follow the steps below.

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Commit and push your code.
  4. Open a pull request describing your changes in detail.

License

This project is licensed under the MIT License. See the LICENSE file for details.