Skip to content

nwinch/australian-states

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
}]
*/

About

List of Australian state information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published