Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bcp47

gagle835.1kMIT1.1.2

Parser for the BCP 47 language tag specification

bcp47, parser, internationalization, i18n, language, locale

readme

bcp47

Parser for the BCP 47 language tag specification

npm travis coveralls

BCP 47

module.parse(tag) : Object
Parses the language tag and returns an object with all the available information. If the tag is not valid it returns null. Look at the examples folder to see what information returns.

changelog

v1.1.2 (06 Feb 2015) Updated package.json.

v1.1.1 (17 Jan 2015) Clean up.

v1.1.0 (19 Jul 2013) Improved speed by ~10%. The result of "parse()" has been slightly modified. Removed "isValid()".

v1.0.1 (14 Dec 2012) Complete code revision and refactor.

v1.0.0 (27 Oct 2012) First release.