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

@wemap/core

v14.7.0

Published

Core configuration, livemap services and shared types for the Wemap SDK.

Readme

Core Package

The core package provides the foundational functionality for the Wemap SDK, including initialization, configuration management, and HTTP client services.

Features

  • SDK Initialization: Initialize the SDK with your livemap ID and authentication token
  • Configuration Management: Access global configuration across all SDK packages
  • HTTP Client: Robust HTTP client with automatic JSON parsing, error handling, and timeout support
  • Livemap Service: Fetch and parse livemap data from the Wemap API
  • Geocoding: Forward and reverse geocoding via the Wemap geocoding API

Getting Started

import { core } from '@wemap/core';

// Initialize the SDK
await core.init({
  emmid: 'your-emmid',
  token: 'your-token'
});

// Access configuration
const config = CoreConfig.getConfig();

Main Classes

  • CoreConfig: Main configuration class for SDK initialization
  • HttpClient: HTTP client for making API requests
  • LivemapService: Service for fetching livemap data
  • GeocodingService: Forward and reverse geocoding

Content search / pinpoint search

After core.init(), use createPinpointManager() to search pinpoints in the current viewport. Bounds are required — pass ...boundsToDelta(map.getBounds()) from @wemap/core:

import { boundsToDelta, core } from '@wemap/core';

await core.init({ emmid, token });
const pinpointManager = core.createPinpointManager();

const { items, count, next } = await pinpointManager.search({
  query: 'café',
  ...boundsToDelta(map.getBounds()),
  level: map.getLevel() ?? undefined,
  limit: 20,
  offset: 0,
});

Search results are upserted into a shared internal cache (one per livemap). @wemap/map uses the same cache for invisible viewport preload and to resolve full Pinpoint entities on POI click — integrators do not manage the cache.

Query normalisation (livemap parity):

  • level alone becomes levels: "null,<level>"; when both level and levels are set, levels wins.
  • tags accepts string | string[] (arrays are joined with ,).
  • Default query_mode: 'phrase'.
  • Pinpoint API calls do not send Authorization.

The exported Pinpoint type is a minimal read model: id, name, description?, coordinates, level?, altitude?, tags?, category?, image_url?, address?.

Geocoding

Forward and reverse geocoding against https://geocoding.getwemap.workers.dev. Does not require core.init():

import { GeocodingService, core } from '@wemap/core';

const geocoding = core.createGeocodingService({ language: 'fr', region: 'fr' });
// or: new GeocodingService({ language: 'fr' })

const place = await geocoding.search('Paris');
const places = await geocoding.searchMultiple('Paris');
const address = await geocoding.reverseGeocode(48.85, 2.35);

GeocodingResult exposes id, placeType, relevance, text, placeName, language?, latitude, longitude, and optional bbox as [west, south, east, north]. Per-call language / region / bbox override constructor defaults.

Tags & categories

Livemaps ship with a tag configuration: the tags used to classify pinpoints, and the categories they can be grouped by. Read them after core.init() to build tag filters, legends or category menus:

import { CoreConfig, core } from '@wemap/core';

await core.init({ emmid: '31668', token: 'YOUR_TOKEN' });

const { tags, categories } = CoreConfig.getTagsConfig();

// e.g. group tags by category slug
const transport = tags.filter((tag) => tag.category === 'transport');

Each LivemapTag exposes name, slug, and optional category (a category slug), color and icon. A pinpoint references its tags by slug (Pinpoint.tags), so you can join the two. Each LivemapTagCategory exposes name and slug. Both arrays are empty when the livemap has no tags.