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

ascii-worldmap

v1.1.1

Published

An ASCII world map written for NodeJS

Downloads

3

Readme

ASCII-WorldMap

Want to show where your team mates are around the world? But think Google's API is just way too practical?

Just use ASCII!

You can add markers to the map, or just return the map plain. There are added options for a border, padding and margins, just like css.

Basic Usage

See a demo on RunKit

import { drawMap } from "ascii-worldmap"

// you can ignore the icon and label fields, logo defaults to "#", label is unused
const markers = [
    { label: "London", lon: -0.192098, lat: 51.610002, icon: "\x1b[31m#\x1b[39m" },
    { label: "LA", lon: -118.441495, lat: 33.929047, icon: "\x1b[31m#\x1b[39m" },
    { label: "CHCH", lon: 172.63623, lat: -43.532055, icon: "\x1b[31m#\x1b[39m" }
];

const config = {
    border: true,
    margin: 2,
    padding: 2
}

console.log(drawMap(markers, config));

Screenshot

Docs

drawMap( markers: object, config: object, timeZoneOverlay )

markers (optional)

| attribute | type | description | | --- | --- | -- | | lon | number | Longitude | | lat | number | Latitude | | label | string | Label (Currently unsused) | | icon (optionsl) | string | Icon used when drawing to the map Defaults to "#" |

config (optional)

| attribute | type | description | | --- | --- | --- | | margin (optional) | number | Number of spaces outside border. Is halved for vertical space | | border (optional) | boolean | Toggles border | | padding (optional) | number | Number of spaces inside border. Is halved for vertical space |

timeZoneOverlay (optional)

This overlays a pattern of the given char covering a time range. Each longitude is given an estimated UTC offset and the localTme is tested to be withing the given range (startTime -> endTime).

| attribute | type | description | | --- | --- | --- | | startHour | number | Points with estimated time after this appear with overlay eg: 7:01 counts as after 7:00 (is overlayed) | | endHour | number | Points with estimated time before this appear with overlay eg: 6:59 counts as before 7:00 (is overlayed) | | char | string | char used for overlay. Recommended: "`" | | coverMap | boolean | By default the map only replaces empty spaces in the map with an overlay (so the overlay is transparent and you can still see the map). This makes the overlay cover the map totally (excluding markers) | | testHour (optional) | number | For testing purposes you can force the hour to be static at a given UTC. Not recommended outside of testing |

Usage

See a demo on RunKit

import { drawMap } from "ascii-worldmap"

console.log(drawMap([], {}, {startHour: 7, endHour: 17, char: "`"}));

Output

``````````.`_..::__:  ,-"-"._       |]       ,     _,.__    ``````````
``_.___`_`_<_>`!(._`.`-.    /        _._     `_ ,_/  '  '-._.---.-.__`
.{`````"`"``-==,',._\{  \  / {) _   / _ ">_,-' `            `````/-/_`
\_.:--.````````._`)`^-. "'     / ( [_/(                     ``__,/-'``
'"'````\````````"`   _\        -_,--'                  )    `/.`(|````
```````|`````````` ,'         _)_.\\._<> {}              _,'`/``'`````
````````.`````````/          [_/_'` `"(                <'}  )`````````
````````\\````.-.`)          /   `-'"..' `:._          _)  '``````````
``````````\``(```(          /         `:\  > \  ,-^.  /' '  ``````````
````````````._,```""        |           \`'   \|   ?_)  {\  ``````````
```````````````=.---.       `._._       ,'     "`  |' ,- '. ``````````
````````````````|`   `-._        |     /          `:`<_|=--._`````````
````````````````(`       >       .     | ,          `=.__.`-'\````````
``````````````````.     /        |     |{|              ,-.,\`````.```
``````````````````|   ,'          \   / `'            ,"    `\````````
``````````````````|  /             |_'                |  __ `/````````
``````````````````| |                                 '-'  `-'```\.```
``````````````````|/                                        "````/````
``````````````````\.                                        ````'`````
``````````````````                                          ``````````
`````````````````` ,/           ______._.--._ _..---.---------.```````
__,-----"-..?----_/ )\    . ,-'"             "              ````(__--/
``````````````````  /__/\/                                  ``````````