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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blac-sheep/atlas

v0.2.3

Published

A simple library containing information about countries and their territories.

Downloads

6

Readme

Atlas

Atlas is a simple library containing data about countries and their territories. The term territory here refers to any place that holds an equivalence to a state in their respective country, each territory can have additional information of itself, including the list of cities within it.

The data provided by this library has been scraped from different sites and is provided with no guarantees of it being accurate or complete.

Country territories will be added as they are required (gathering all data takes quite some time), but any contributions are welcome!

Data Sources

Countries: https://github.com/mledoze/countries

Countries

United States

The data for the US includes data on 50 States, 1 Federal District and 5 special areas.

For simplicity purposes, cities, towns and villages that are officially incorporated into a state regardless of its population have have been included as cities.

CDPs have been included in Hawaii's data and Townships were not included in Michigan's data.

Data Sources

Documentation

Installation

Atlas is provided as an UMD module that can be installed by adding the files manually to your project or via a package manager.

Yarn

yarn add @blac-sheep/atlas

NPM

npm install @blac-sheep/atlas

Adding it manually

<script src="atlas.min.js"></script>

Usage

NodeJS

const atlas = require ('@blac-sheep/atlas');

ES6

import Atlas as atlas from '@blac-sheep/atlas';

Browser

const atlas = Atlas.default;

Classes

Atlas

Static Properties

| Name | Type | Description | | ---- | ---- | ----------- | | countries | Array<Country> | List of countries available on the Atlas |

Country

Instance Properties

| Name | Type | Description | | ---- | ---- | ----------- | | name | Array<Country> | Country's name commonly used | | official_name | string | Country's official name | | capital | string | Country's capital | | flag | string | Country's flag unicode (emoji) | | abbreviation | string | Country's 2 letter code | | territories | Array<Territory> | List of territories belonging to the country |

Territory

Instance Properties

| Name | Type | Description | | ---- | ---- | ----------- | | name | string | Territory's name | | abbreviation | string | Territory's abbreviation | | type | string | Territory's legal status within the country (State, Unincorporated, Unorganized, etc.) | | capital | string | Territory's capital city (If applies) | | cities | Array<string> | List of cities (officially incorporated places) in the territory |

License

Atlas is released under the GPLv3 license.