Skip to content

Commit

Permalink
Merge pull request #10 from jerrychong25/dev
Browse files Browse the repository at this point in the history
Added getFederalTerritories()
  • Loading branch information
jerrychong25 authored Feb 16, 2020
2 parents f271704 + b9818cb commit d95f7bb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,29 @@ module.exports.getStates = (language) => {
}

return statesList
}

module.exports.getFederalTerritories = (language) => {

let federalTerritoriesList

if (language === 'en' | language === 'ms') {
federalTerritoriesList = {
federal_territories: [
'Kuala Lumpur',
'Labuan',
'Putrajaya'
]
}
} else if (language === 'zh') {
federalTerritoriesList = {
federal_territories: [
'吉隆坡',
'纳闽',
'布城'
]
}
}

return federalTerritoriesList
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "malaysia-list",
"version": "0.0.3",
"version": "0.0.4",
"description": "This package will display all lists related to Malaysia",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d95f7bb

Please sign in to comment.