Skip to content

Commit

Permalink
List supported languages in hyphenopoly.module.js
Browse files Browse the repository at this point in the history
fixes #57
This is a simple array containing the language codes of the
pattern files.

Expample:
const hyphenopoly = require("hyphenopoly");
hyphenopoly.supportedLanguages.includes("en-us"); //true
hyphenopoly.supportedLanguages.includes("en"); //false
  • Loading branch information
mnater committed Feb 10, 2019
1 parent 133c85f commit 6f5771a
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
74 changes: 74 additions & 0 deletions hyphenopoly.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,80 @@ function setProp(val, props) {
const H = empty();
H.binaries = new Map();

H.supportedLanguages = [
"af",
"as",
"be",
"bg",
"bn",
"ca",
"cs",
"cy",
"da",
"de",
"el-monoton",
"el-polyton",
"en-gb",
"en-us",
"eo",
"es",
"et",
"eu",
"fi",
"fr",
"fur",
"ga",
"gl",
"grc",
"gu",
"hi",
"hr",
"hsb",
"hu",
"hy",
"ia",
"id",
"is",
"it",
"ka",
"kmr",
"kn",
"la-x-liturgic",
"la",
"lt",
"lv",
"ml",
"mn-cyrl",
"mr",
"mul-ethi",
"nb-no",
"nl",
"nn",
"oc",
"or",
"pa",
"pl",
"pms",
"pt",
"rm",
"ro",
"ru",
"sa",
"sh-cyrl",
"sh-latn",
"sk",
"sl",
"sr-cyrl",
"sv",
"ta",
"te",
"th",
"tk",
"tr",
"uk",
"zh-latn-pinyin"
];

/**
* Read a file and call callback
* Use "fs" (node) or "http" (browser)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
"array-element-newline": [
1,
{
"multiline": true
"multiline": true,
"minItems": 12
}
],
"no-magic-numbers": 0,
Expand Down

0 comments on commit 6f5771a

Please sign in to comment.