Skip to content

Commit

Permalink
language not case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
angaz committed Nov 20, 2016
1 parent 7a61f7e commit e0697ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "build/index.js",
"scripts": {
"build": "babel src --out-dir build",
"test": "mocha --require babel-core/register"
"test": "mocha --require babel-core/register --harmony_array_includes"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class ISO6391 {

static getCode = (name) => {
const [code] = Object.entries(LANGUAGES_LIST)
.find(([code, language]) => language.name === name || language.nativeName === name)
.find(([code, language]) => language.name.toLowerCase() === name.toLowerCase() || language.nativeName.toLowerCase() === name.toLowerCase())

return code === undefined ? '' : code
}
Expand Down

0 comments on commit e0697ac

Please sign in to comment.