Add isKnown method

Checks if a given language code is known to the library database.
This commit is contained in:
Santhosh Thottingal
2017-10-10 12:09:25 +05:30
parent e6a4fcb383
commit 2ecc48b816
2 changed files with 22 additions and 4 deletions

View File

@@ -85,6 +85,12 @@ describe( 'languagedata', function () {
}
return result;
};
it( 'language tags', function () {
assert.ok( languageData.isKnown( 'ar' ), 'Language is unknown' );
assert.ok( !languageData.isKnown( 'unknownLanguageCode!' ), 'Language is known' );
} );
it( 'autonyms', function () {
var autonyms;
// Add a language in run time.