<commit_before># locale-mapper

[![Build Status](https://travis-ci.org/oleksmarkh/locale-mapper.svg)](https://travis-ci.org/oleksmarkh/locale-mapper)
[![Dependency Status](https://david-dm.org/oleksmarkh/locale-mapper.svg)](https://david-dm.org/oleksmarkh/locale-mapper)
[![Coverage Status](https://coveralls.io/repos/oleksmarkh/locale-mapper/badge.svg)](https://coveralls.io/github/oleksmarkh/locale-mapper)


## usage

```js
var localeMapper = new LocaleMapper(navigator);

localeMapper.normalize();     // 'en-US'
localeMapper.normalize(true); // 'en', passing the "onlyLanguage" flag

localeMapper.fallback({'de-DE': ['de',        // explicit mapping
                                 'de-DE',
                                 'de-AT'],
                       'de-CH': ['de-CH'],    // another explicit mapping for the same family
                       'es': ['*'],           // language family wildcard
                       'pt-PT': ['*',
                                 '!pt-BR']}); // wildcard exclusions
```
<commit_msg>update badges in README<commit_after># locale-mapper

  [![travis][travis-image]][travis-url]
  [![deps][deps-image]][deps-url]
  [![license][license-image]][license-url]
  [![test coverage][test-coverage-image]][test-coverage-url]
  ![code size][code-size-image]

## usage

```js
var localeMapper = new LocaleMapper(navigator);

localeMapper.normalize();     // 'en-US'
localeMapper.normalize(true); // 'en', passing the "onlyLanguage" flag

localeMapper.fallback({'de-DE': ['de',        // explicit mapping
                                 'de-DE',
                                 'de-AT'],
                       'de-CH': ['de-CH'],    // another explicit mapping for the same family
                       'es': ['*'],           // language family wildcard
                       'pt-PT': ['*',
                                 '!pt-BR']}); // wildcard exclusions
```

[travis-image]: https://img.shields.io/travis/oleksmarkh/locale-mapper/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/oleksmarkh/locale-mapper
[deps-image]: https://img.shields.io/david/oleksmarkh/locale-mapper.svg?style=flat-square
[deps-url]: https://david-dm.org/oleksmarkh/locale-mapper
[license-image]: https://img.shields.io/github/license/oleksmarkh/locale-mapper.svg?style=flat-square
[license-url]: https://github.com/oleksmarkh/locale-mapper/blob/master/LICENSE
[test-coverage-image]: https://img.shields.io/coveralls/github/oleksmarkh/locale-mapper.svg?style=flat-square
[test-coverage-url]: https://coveralls.io/github/oleksmarkh/locale-mapper
[code-size-image]: https://img.shields.io/github/languages/code-size/oleksmarkh/locale-mapper.svg?style=flat-square

{'fraction_non_alphanumeric': 0.17736549165120594, 'fraction_numerical': 0.0, 'mean_word_length': 2.618791946308725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 15, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782245', 'n_tokens_mistral': 891, 'n_tokens_neox': 876, 'n_words': 112}