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

srilankan-postalcode-backend

v1.0.0

Published

The srilankan-postalcode npm package provides a comprehensive set of utilities for working with Sri Lankan postal codes. It offers functionalities for validation, extraction, and formatting of postal codes, enabling seamless integration into applications

Downloads

19

Readme

Sri Lanka Districts Cities Json

Cities by Districts

The srilankan-postalcode npm package provides a comprehensive set of utilities for working with Sri Lankan postal codes. It offers functionalities for validation, extraction, and formatting of postal codes, enabling seamless integration into applications that require precise address management within Sri Lanka. Whether you're building an e-commerce platform, a logistics solution, or any application involving location-based services in Sri Lanka, this package simplifies the process of handling postal codes.

Statistics

  • Districts - 25
  • Cities - 1990 (still updating)

Cities and Postal-code by District

Statistics

  • Districts - 25
  • Cities - 1990 (still updating)
  • Jaffna, Kilinochchi, Mannar, Mullativu, Vavuniya postal-code still pending.

Cities

  1. Ampara - 61
  2. Anuradhapura - 129
  3. Badulla - 132
  4. Batticaloa - 46
  5. Colombo - 80
  6. Galle - 95
  7. Gampaha - 125
  8. Hambantota - 64
  9. Jaffna - 50
  10. Kalutara - 81
  11. Kandy - 165
  12. Kegalle - 98
  13. Kilinochchi - 1
  14. Kurunegala - 201
  15. Mannar - 26
  16. Matale - 71
  17. Matara - 77
  18. Monaragala - 58
  19. Mullativu - 17
  20. Nuwara Eliya - 70
  21. Polonnaruwa - 62
  22. Puttalam - 81
  23. Ratnapura - 118
  24. Trincomalee - 39
  25. Vavuniya - 43

Features

  • Get all cities
  • Get all cities by district
  • Get postal-code by city

Browser Support

  • Chrome
  • Firefox
  • Safari
  • Opera
  • Edge
  • IE 11

Installation

npm install srilankan-postalcode

Usage

const postalcode = require("srilankan-postalcode");

// Get all cities
const cities = postalcode.getAllCities();
console.log(cities);

// Get all cities by district
const citiesByDistrict = postalcode.getCitiesByDistrict("Colombo");
console.log(citiesByDistrict);

// Get postal-code by city
const postalCode = postalcode.getPostalCodeByCity("Colombo", "Colombo 01");
console.log(postalCode);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Keywords

  • Sri Lanka
  • Sri Lanka Postal Code
  • Sri Lanka Postal Code Validation
  • Sri Lanka Postal Code Extraction
  • Sri Lanka Postal Code Formatting
  • Sri Lanka Postal Code Validation

Creator