How to use the i18n-postal-address.default function in i18n-postal-address

To help you get started, we’ve selected a few i18n-postal-address examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Rudloff / openvegemap / js / popup.js View on Github external
function getAddressRow() {
        var street = '',
            address = new PostalAddress.default();

        if (tags['addr:housenumber']) {
            street += tags['addr:housenumber'] + ' ';
        }
        if (tags['addr:street']) {
            street += tags['addr:street'];
        }

        address.setAddress1(street);
        address.setCity(tags['addr:city']);
        address.setPostalCode(tags['addr:postcode']);
        address.setFormat({
            country: tags['addr:country'],
            type: 'business'
        });

i18n-postal-address

A JavaScript library to produce international postal addresses formatted by region for node and the web

MIT
Latest version published 3 months ago

Package Health Score

71 / 100
Full package analysis

Popular i18n-postal-address functions