1.0.0 • Published 7 years ago

address-encoder v1.0.0

Weekly downloads
1,167
License
MIT
Repository
github
Last release
7 years ago

MaaS Address Encoder

Build Status

Install

npm install address-encoder

Description

Encode and decode MaaS's address schemas

The format: country:Finland|city:Helsinki|zipCode:00100|streetName:Ludviginkatu|streetNumber:6

Will be turned into the following object after decoding

{
  country: "Finland",
  city: "Helsinki",
  streetName: "Ludviginkatu",
  streetNumber: "6"
}

Current supports

  • Required fields: requires different fields to have non-empty value inside the encoded string
  • Decoding the format