New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

states-us

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

states-us

List of US states and territories.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

NPM Version CI codecov

US States

List of US states and territories.

Installation

npm install states-us --save

Usage

import states from 'states-us';

console.log(states);
// => all states and territories

const example1 = states.filter((x) => x.contiguous);
console.log(example1);
// => contiguous states only

const example2 = states.filter((x) => x.territory);
console.log(example2);
// => territories only

const example3 = states.map((x) => x.abbreviation);
console.log(example2);
// => all state/territory abbreviations

The default export from states-us is an array of State, with the following structure:

PropertyTypeDescriptionExample
namestringState name.Alaska
abbreviationstringState abbreviation.AK
territorybooleanIndicates if the state is a territory.false
contiguousbooleanIndicates if the state is contiguous.false

Development

npm install
npm run build

Keywords

FAQs

Package last updated on 22 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc