0.3.0 • Published 4 years ago

@bcredi/postalcode v0.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Postal Code JS Library

A JavaScript library to interface with Postal Code API.

Description

This library covers all your needs for integrating with Postal Code API, providing:

  • A clean Promise-based interface
  • Postal code validations (type and length)

Installation

yarn add @bcredi/postalcode --save

How to use

ES6

Import like usual:

import postalcode from '@bcredi/postalcode';

postalcode('81050200').then(console.log);

// "data": {
//  "abbreviation": "R Pedro Gusso",
//  "city": "Curitiba",
//  "complement": "- até 1384/1385",
//  "name": "Pedro Gusso",
//  "neighborhood": "Novo Mundo",
//  "postal_code": 81050200,
//  "state": "PR",
//  "type": "Rua"
// }

UMD in Browser

You can also use the latest release from our CDN and import the build directly in your HTML:

<script src="http://cdn.jsdelivr.net/npm/@bcredi/postalcode@latest" />

The library will be available as the global variable postalcode.

Building

To build the library, use npm dev.

Testing

To run the library tests, use npm test.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

The MIT License (MIT)
Copyright (c) 2019 Bcredi Serviços de Crédito e Cobrança S.A.
0.3.0

4 years ago

0.3.0-beta.4

4 years ago

0.3.0-beta.3

4 years ago

0.3.0-beta.2

4 years ago

0.3.0-beta.1

4 years ago

0.3.0-beta.0

4 years ago

0.2.0

5 years ago

0.1.0

5 years ago