Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/derhuerst/match-german-federal-states

Try to match a German federal state name with its ISO code.
https://github.com/derhuerst/match-german-federal-states

federal-state german iso search

Last synced: 6 days ago
JSON representation

Try to match a German federal state name with its ISO code.

Awesome Lists containing this project

README

        

# match-german-federal-states

**Try to match a [German federal state](https://en.wikipedia.org/wiki/States_of_Germany) name with its [ISO code](https://en.wikipedia.org/wiki/ISO_3166-2:DE).** Inspired by [`match-country-german`](https://github.com/juliuste/match-country-german).

[![npm version](https://img.shields.io/npm/v/match-german-federal-states.svg)](https://www.npmjs.com/package/match-german-federal-states)
[![build status](https://img.shields.io/travis/derhuerst/match-german-federal-states.svg)](https://travis-ci.org/derhuerst/match-german-federal-states)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/match-german-federal-states.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)

## Installing

```shell
npm install match-german-federal-states
```

## Usage

```js
const match = require('match-german-federal-states')

// English
match('Brandenburg') // BB
match('rhineland palatinate') // RP
match('baden-weurttemberg') // BW

// German
match('Brandenburg', 'de') // BB
match('mecklenburg vorpommern', 'de') // MV
match('neidersachsen', 'de') // NI
match('thüringen', 'de') // TH
```

## See also

- [`match-country-german`](https://github.com/juliuste/match-country-german) – Try to match given german country name with its ISO code.

## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/match-german-federal-states/issues).