npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lailao10x/lao-address

v0.0.3

Published

This package is used to query all address data in Laos

Downloads

9

Readme

Lao Address

Package lao-address ເປັນ Package ຕົວຫນື່ງທີ່ຈະຊ່ວຍໃຫ້ນັກພັດທະນາລະບົບຊອບແວໃນປະເທດ ສາມາດດືງຂໍ້ມູນບ້ານ ເມືອງ ແລະ ແຂວງທັງຫມົດໃນປະເທດລາວຢ່າງງ່າຍດາຍ. ໃນຕົວ Package ນີ້, ນອກຈາກຈະເປັນການດືງຂໍ້ມູນໃນຮູບແບບພາສາລາວ ມັນຍັງມີປະກອບດ້ວຍຂໍ້ມູນຊື່ບ້ານ ເມືອງ ແຂວງ ໃນຮູບແບບພາສາອັງກິດອີກດ້ວຍ.

Installation

# using npm
npm install @lailao10x/lao-address

# using yarn
yarn add @lailao10x/lao-address

Usage

# using require
const laoAddress = require('@lailao10x/lao-address');

# using import
import laoAddress from '@lailao10x/lao-address';

Examples

ຕົວຢ່າງທີ 1

ຕົວຢ່າງການດືງຂໍ້ມູນຂໍ້ແຂວງທັງໝົດ;

const laoAddress = require("@lailao10x/lao-address");

let options = {
  province: "all",
};

let provinces = laoAddress(options);

console.log(provinces); // ສະແດງບັນດາແຂວງທັນຫມົດໃນປະເທດລາວ

// [
//   { pid: '1', pn: 'ນະຄອນຫລວງວຽງຈັນ', pn_en: 'Vientiane capital' },
//   { pid: '2', pn: 'ຜົ້ງສາລີ', pn_en: 'Phongsali' },
//   { pid: '3', pn: 'ຫລວງນ້ຳທາ', pn_en: 'Louang Namtha' },
//   { pid: '4', pn: 'ອຸດົມໄຊ', pn_en: 'Oudomxai' },
// ...
// ...

ຕົວຢ່າງທີ 2

ຕົວຢ່າງການດືງຂໍ້ມູນຂໍ້ແຂວງໃດຫນື່ງ ເຊັ່ນ ແຂວງ ອຸດົມໄຊ;

const laoAddress = require("@lailao10x/lao-address");

let options = {
  province: 4,
};

let provinces = laoAddress(options);

console.log(provinces); // { pid: '4', pn: 'ອຸດົມໄຊ', pn_en: 'Oudomxai' }

ຄວາມແຕກຕ່າງລະຫວ່າງການດືງຂໍ້ມູນທັງຫມົດ ແລະ ເຈາະຈົງ

ຖ້າຫາກດືງຂໍ້ມູນທັງຫມົດ ເຮົາຈະໄດ້ຮັບຂໍ້ມູນໃນຮູບແບບຂອງ Array. ຖ້າຫາກດືງຂໍ້ມູນແບບເຈາະຈົງ ເຮົາຈະໄດ້ຮັບຂໍ້ມູນໃນຮູບແບບຂອງ Object.

Options

| Options | Meaning | | ------------------------------------------------------ | ------------------------------------------- | | { province: 'all' } | ສະແດງຊື່ແຂວງທັງຫມົດ | | { province: 'all', district: 'all' } | ສະແດງຊື່ເມືອງທັງຫມົດໃນທຸກໆແຂວງ | | { province: 'all', district: 'all' } | ສະແດງຊື່ເມືອງທັງຫມົດໃນທຸກໆແຂວງ | | { province: 'all', district: 'all', village: 'all' } | ສະແດງຊື່ບ້ານທັງຫມົດໃນທຸກໆເມືອງ ແລະ ທຸກໆແຂວງ | | { province: '05', district: 'all' } | ສະແດງຊື່ເມືອງທັງຫມົດຂອງແຂວງລະຫັດທີ 05 | | { province: '05', district: '501' } | ສະແດງຊື່ເມືອງທີ່ມີລະຫັດທີ 501 | | { province: '05', village: 'all' } | ສະແດງຊື່ບ້ານທັງຫມົດດຂອງແຂວງລະຫັດທີ 05 | | { village: 'all' } | ສະແດງຊື່ບ້ານທັງຫມົດ |

ນອກຈາກນີ້ ຍັງມີຫລາຍໆ options ໃຫ້ນັກພັດທະນາຫລາຍໆຄົນສາມາດດືງເອົາຂໍ້ມູນທີ່ຕ້ອງການໄດ້.

Keys

ຈາກການສັງເກດ Options ແລ້ວ, ຖ້າຫາກ options ມີບ້ານ village: 'all' ສະແດງວ່າ ການດືງຄັ້ງນັ້ນຈະຖືເອົາຂໍ້ມູນບ້ານເປັນຫລັກ, ກໍຄືລະບົບຈະສົ່ງພຽງແຕ່ຂໍ້ມູນບ້ານກັບມາ.

ລຳດັບຄວາມສຳຄັນຂອງ Options

village > district > province