JSPM

  • Created
  • Published
  • Downloads 238510
  • Score
    100M100P100Q163476F
  • License MIT

Is given string a language code (as per IANA)

Package Exports

  • is-language-code

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-language-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-language-code

Is given string a language code (as per IANA)

Install

npm i is-language-code

Quick Take

import { strict as assert } from "assert";
import isLangCode from "dist/is-language-code.esm";

assert.deepEqual(isLangCode("de-419-DE"), {
  res: false,
  message: 'Two region subtags, "419" and "de".',
});

assert.deepEqual(isLangCode("sr-Latn"), {
  res: true,
  message: null,
});

Documentation

Please visit codsen.com for a full description of the API and examples.

Licence

MIT License

Copyright (c) 2010-2020 Roy Revelt and other contributors

ok codsen star