zip-code-luxembourg
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

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.

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i zip-code-luxembourg

    Weekly Downloads

    7

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    1.9 MB

    Total Files

    10

    Last publish

    Collaborators

    • julien.galego