Add the Ol Chiki script (Olck), add getLanguages(), and fix the tests
The tests were using languageData.languages, which was undefined. This patch adds a method to get all the languages to be able to test.
This commit is contained in:
committed by
Niklas Laxström
parent
d6912d6c94
commit
87b3fd8666
9
index.js
9
index.js
@@ -24,6 +24,14 @@ function isRedirect( language ) {
|
||||
return ( isKnown( language ) && languageData.languages[ language ].length === 1 ) ? languageData.languages[ language ][ 0 ] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the languages
|
||||
* @return {Object}
|
||||
*/
|
||||
function getLanguages() {
|
||||
return languageData.languages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the script of the language.
|
||||
* @param {string} language Language code
|
||||
@@ -278,6 +286,7 @@ module.exports = {
|
||||
getAutonyms,
|
||||
getDir,
|
||||
getGroupOfScript,
|
||||
getLanguages,
|
||||
getLanguagesByScriptGroup,
|
||||
getLanguagesByScriptGroupInRegion,
|
||||
getLanguagesByScriptGroupInRegions,
|
||||
|
||||
Reference in New Issue
Block a user