Skip to content

juliengalego/zip-code-luxembourg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zip Code Info

A simple npm package to retrieve zip code information for Luxembourg without external dependencies.

Installation

To install this package, you can use npm or yarn:

npm install zip-code-luxembourg

Usage

Get postal information (district, canton, municipality, city, street) linked to a zip code.

const {getInfos} = require('zip-code-luxembourg');
const result = getInfos({zipCode:'1234'});
console.log(result);

Output

[
  {
    district: 'LUXEMBOURG',
    canton: 'LUXEMBOURG-VILLE',
    municipality: 'Luxembourg',
    city: 'Luxembourg',
    street: 'Rue Marguerite-Séraphine Beving',
    zipCode: '1234'
  }
]

Alternative usage

You can filter by any postal information (district, canton, municipality, city, street, zip code) For example if you want to get all the streets of one city:

const {getInfos} = require('zip-code-luxembourg');
const result = getInfos({city:'Belvaux'}).map((item) => item.street);
console.log(result);

Output

 [
      'Avenue du Blues',
      'Avenue du Swing',
      'Avenue Michel Majerus',
      'Belval-Rédange-Halte',
      ...
]

Data source

Our npm package leverages data from the Registre national des localités et des rues dataset issued by Administration du cadastre et de la topographie, a comprehensive source of information on cities, streets, and postal codes in Luxembourg The data is converted to json with /lib/convert-csv-to-json.js This package will be updated along the source dataset.

License

This package is distributed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published