Skip to content

Latest commit

 

History

History
283 lines (236 loc) · 6.6 KB

README.md

File metadata and controls

283 lines (236 loc) · 6.6 KB

Malaysia List

Website shields.io GitHub release Maintenance Hits

Getting Started

This npm package displays all lists related to Malaysia.

Usage

init() - Set default language

Language Options

English - en
Malay - ms
Chinese - zh
Tamil - ta

Code Example

const malaysiaList = require('malaysia-list');
malaysiaList.init('en');      // Set English as default language

getStates() - Return all states

Code Example

malaysiaList.getStates();

Response (English / Malay)

{
  "states": [
    "Johor Darul Ta'zim",
    "Kedah Darul Aman",
    "Kelantan Darul Naim",
    "Malacca",
    "Negeri Sembilan Darul Khusus",
    "Pahang Darul Makmur",
    "Penang",
    "Perak Darul Ridzuan",
    "Perlis Indera Kayangan",
    "Sabah",
    "Sarawak",
    "Selangor Darul Ehsan",
    "Terengganu Darul Iman"
  ]
}

Response (Chinese)

{
  "states": [
    "柔佛",
    "吉打",
    "吉兰丹",
    "马六甲",
    "森美兰",
    "彭亨",
    "槟城",
    "霹雳",
    "玻璃市",
    "沙巴",
    "砂拉越",
    "雪兰莪",
    "登嘉楼"
  ]
}

getFederalTerritories() - Return all federal territories

Code Example

malaysiaList.getFederalTerritories();

Response (English / Malay)

{
  "federal_territories": [
    "Kuala Lumpur",
    "Labuan",
    "Putrajaya"
  ]
}

Response (Chinese)

{
  "federal_territories": [
    "吉隆坡",
    "纳闽",
    "布城"
  ]
}

getPublicUniversities() - Return all public universities

Code Example

malaysiaList.getPublicUniversities();

Response (English)

{
  "public_universities":[
    "University of Malaya",
    "National University of Malaysia",
    "Putra University, Malaysia",
    "University of Science, Malaysia",
    "University of Technology, Malaysia",
    "Northern University of Malaysia",
    "International Islamic University Malaysia",
    "University of Malaysia Pahang",
    "University of Malaysia Perlis",
    "University of Malaysia Sabah",
    "University of Malaysia Sarawak",
    "University of Malaysia Terengganu",
    "Sultan Idris Education University",
    "University of Malaysia Kelantan",
    "National Defence University of Malaysia",
    "Islamic Science University of Malaysia",
    "Sultan Zainal Abidin University",
    "Technical University of Malaysia Malacca",
    "Tun Hussein Onn University of Malaysia",
    "MARA University of Technology"
  ]
}

Response (Malay)

{
  "public_universities":[
    "Universiti Malaya",
    "Universiti Kebangsaan Malaysia",
    "Universiti Putra Malaysia",
    "Universiti Sains Malaysia",
    "Universiti Teknologi Malaysia",
    "Universiti Utara Malaysia",
    "Universiti Islam Antarabangsa Malaysia",
    "Universiti Malaysia Pahang",
    "Universiti Malaysia Perlis",
    "Universiti Malaysia Sabah",
    "Universiti Malaysia Sarawak",
    "Universiti Malaysia Terengganu",
    "Universiti Pendidikan Sultan Idris",
    "Universiti Malaysia Kelantan",
    "Universiti Pertahanan Nasional Malaysia",
    "Universiti Sains Islam Malaysia",
    "Universiti Sultan Zainal Abidin",
    "Universiti Teknikal Malaysia Melaka",
    "Universiti Tun Hussein Onn Malaysia",
    "Universiti Teknologi MARA"
  ]
}

Response (Chinese)

{
  "public_universities":[
    "马来亚大学",
    "马来西亚国立大学",
    "马来西亚博特拉大学",
    "马来西亚理科大学",
    "马来西亚工艺大学",
    "马来西亚北方大学",
    "马来西亚国际伊斯兰大学",
    "马来西亚彭亨大学",
    "马来西亚玻璃市大学",
    "马来西亚沙巴大学",
    "马来西亚砂拉越大学",
    "马来西亚登嘉楼大学",
    "苏丹依德利斯师范大学",
    "马来西亚吉兰丹大学",
    "马来西亚国防大学",
    "马来西亚伊斯兰理科大学",
    "苏丹再纳阿比丁大学",
    "马来西亚马六甲技术大学",
    "马来西亚敦胡先翁大学",
    "玛拉工艺大学"
  ]
}

getPrimeMinisters() - Return all prime ministers

Code Example

malaysiaList.getPrimeMinisters();

Response (English / Malay)

{
  "prime_ministers": [
          'Tunku Abdul Rahman Putra Al-Haj ibni Almarhum Sultan Abdul Hamid Halim Shah',
          'Tun Haji Abdul Razak bin Dato\' Hussein',
          'Tun Hussein bin Dato\' Onn',
          'Mahathir bin Mohamad',
          'Abdullah bin Haji Ahmad Badawi',
          'Mohammad Najib bin Tun Haji Abdul Razak',
          'Mahathir bin Mohamad',
          'Muhyiddin bin Haji Muhammad Yassin',
          'Dato Sri Ismail Sabri bin Yaakob'
  ]
}

Response (Chinese)

{
  "prime_ministers": [
          '东古·阿卜杜勒·拉赫曼',
          '阿卜杜勒·拉扎克·侯赛因',
          '侯赛因·奥恩',
          '马哈蒂尔·穆罕默德',
          '阿卜杜拉·巴达维',
          '纳吉布·阿卜杜勒·拉扎克',
          '马哈蒂尔·穆罕默德',
          '穆希丁·雅辛',
          '依斯迈沙比里'
  ]
}

Response (Tamil)

    {
    prime_ministers: [
            'துங்கு அப்துல் ரகுமான்',
            'அப்துல் ரசாக் உசேன்',
            'உசேன் ஓன்',
            'மகாதீர் பின் முகமது',
            'அப்துல்லா அகமது படாவி',
            'நஜீப் ரசாக்',
            'மகாதீர் பின் முகமது',
            'முகிதீன் யாசின்',
            'இஸ்மாயில் சப்ரி யாகோப்'
      ]
    }
''''
## Built With

* [Visual Studio Code](https://code.visualstudio.com/)

## Versioning

[Semantic Versioning (SemVer) 2.0.0](http://semver.org/)

## Authors

**Jerry Chong** - [jerrychong25](https://github.com/jerrychong25)<br>

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details