New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bcredi/postalcode

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bcredi/postalcode

A JavaScript library to interface with postal code API

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
4
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 03 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc