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

australian-states

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

australian-states

List of Australian state information.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status

Australian States

List of Australian state information.

Usage

.long([{capitalize: true|false}])

Returns an array of state names. An options object can also be passed which accepts the capitalize property.

Example:

var states = require('australian-states')

states.long() // ["australiation capital territory", "new south wales", ...]
states.long({capitalize: true}) // ["Australiation Capital Territory", "New South Wales", ...]

.short([{capitalize: true|false}])

Returns an array of state abbreviations. An options object can also be passed which accepts the capitalize property.

Example:

var states = require('australian-states')

states.short() // ["act", "nsw", ...]
states.short({capitalize: true}) // ["ACT", "NSW", ...]

.capitals([{capitalize: true|false}])

Returns an array of state capital city names. An options object can also be passed which accepts the capitalize property.

Example:

var states = require('australian-states')

states.capitals() // ["canberra", "sydney", ...]
states.capitals({capitalize: true}) // ["Canberra", "Sydney", ...]

.all()

Returns an array of state objects containing name, abbreviation, capital and type.

Example:

var states = require('australian-states')

states.all()
/*
[{
  name: 'australian capital territory',
  abbreviation: 'act',
  capital: 'canberra',
  type: 'territory'
}]
*/

Keywords

FAQs

Package last updated on 07 Dec 2015

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