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

@geotrustin/ios

v2.0.4

Published

GeoTrustIn is a modular, cross-platform geolocation intelligence library. It doesn't just fetch coordinates—it evaluates the **confidence** of the location data and detects **spoofing risks**, ensuring your applications can trust the location data they re

Readme

GeoTrustIn 🌍🛡️

GeoTrustIn is a modular, cross-platform geolocation intelligence library. It doesn't just fetch coordinates—it evaluates the confidence of the location data and detects spoofing risks, ensuring your applications can trust the location data they receive.

📦 Installation

Since this library is modular, you can install the specific packages you need. For most browser and React applications, you will want the @geotrustin/web package:

npm install @geotrustin/web

If you only want the underlying data engines without the browser integration:

npm install @geotrustin/core @geotrustin/confidence-engine @geotrustin/spoof-detector

🚀 Quick Start (Web & React)

The @geotrustin/web package wraps the standard HTML5 navigator.geolocation API, making it a drop-in replacement that instantly adds confidence and anti-spoofing metrics.

1. Fetching the Current Position

Use getCurrentPosition to get a single, enriched location snapshot.

import { GeoTrustInWeb } from "@geotrustin/web";

async function fetchSecureLocation() {
  try {
    const location = await GeoTrustInWeb.getCurrentPosition({
      enableHighAccuracy: true,
      timeout: 5000,
    });

    console.log("Latitude:", location.latitude);
    console.log("Longitude:", location.longitude);
    
    // 🛡️ GeoTrustIn Exclusive Metrics:
    console.log("Data Confidence (0-100):", location.confidence);
    console.log("Spoof Risk (0-100):", location.spoofRisk);

    if (location.spoofRisk > 50) {
      console.warn("High probability of location spoofing detected!");
    }
    
  } catch (error) {
    console.error("Failed to fetch location:", error.message);
  }
}

2. Watching the Position (Live Tracking)

If you need to track the user's location in real-time (e.g., for navigation or delivery tracking), use watchPosition.

import { GeoTrustInWeb } from "@geotrustin/web";

// Start watching the position
const watchId = GeoTrustInWeb.watchPosition(
  (location) => {
    console.log("New position update:", location);
    
    if (location.confidence < 70) {
      console.warn("Location accuracy is currently low.");
    }
  },
  (error) => {
    console.error("Tracking error:", error);
  },
  { enableHighAccuracy: true }
);

// Stop watching later on when the component unmounts
GeoTrustInWeb.clearWatch(watchId);

🏗️ Architecture & Packages

This monorepo is divided into specific micro-packages to ensure you only bundle what you need:

  • @geotrustin/web: The main entry point for browser environments (React, Next.js, Vue, vanilla JS). Uses navigator.geolocation.
  • @geotrustin/core: The central orchestrator that pipes raw coordinates through the confidence and spoofing engines.
  • @geotrustin/confidence-engine: Calculates a 0-100 score based on GPS accuracy bounds.
  • @geotrustin/spoof-detector: Identifies inconsistencies and flags (like isMockLocation) to calculate a spoof risk score.
  • (Coming Soon) @geotrustin/react-native: Native wrappers for iOS and Android environments.

📊 The LocationResult Object

All successful requests return a LocationResult object shaped like this:

interface LocationResult {
  latitude: number;
  longitude: number;
  accuracy: number;        // Raw radius of accuracy in meters
  provider: "gps" | "network" | "fused" | "unknown";
  confidence: number;      // 0-100 score of how accurate the fix is
  spoofRisk: number;       // 0-100 score of how likely the data is faked
  timestamp: number;       // Epoch time in milliseconds
}

📝 License

ISC License.