0.0.6 • Published 1 year ago

thailand-address-simple v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Thailand Address Simple

ต้นฉบับ: https://earthchie.github.io/jquery.Thailand.js v1.5.3.5 Demo: https://jakkarin.github.io/thailand-address-simple

ติดตั้ง

yarn

yarn add thailand-address-simple

npm

npm install thailand-address-simple

วิธีใช้

browser

<html>
    <head>
        <!-- ... -->
        <script src="https://jakkarin.github.io/thailand-address-simple/dist/bundle.umd.js"></script>
    </head>
    <body>
        <!-- ... -->
        <script>
            const address = new ThailandAddressSimple();
            address.init().then(() => {
                address.search("สมเด็จ กาฬสินธุ์");
            });
        </script>
    </body>
</html>

nodejs

import ThailandAddressSimple from "thailand-address-simple";

const address = new ThailandAddressSimple();

address.init().then(() => {
    // result
    // [
    //     {
    //         amphoe: 'สมเด็จ';
    //         district: 'สมเด็จ';
    //         province: 'กาฬสินธุ์';
    //         zipcode: '46150';
    //     },
    //     ...
    // ]
    address.search("สมเด็จ กาฬสินธุ์");
    address.searchByZipCode("46150");
    address.searchByDistrict("สมเด็จ");
    address.searchByAmphoe("สมเด็จ");
    address.searchByProvince("กาฬสินธุ์");
});

License

WTFPL 2.0 http://www.wtfpl.net Also MIT (formally)

0.0.6

1 year ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago