Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

countryjs-states-paypal

0.2.0 • Public • Published

countryjs-states-paypal

npm version Build Status Inline docs

A Node.js module that map countryjs's states or provinces to PayPal's.

Table of Contents

Install

npm install countryjs-states-paypal

Usage

To map a country's states from countryjs state or province name to PayPal's, use the following API method:

var countryjsToPaypal = require("countryjs-states-paypal")
 
countryjsToPaypal.find("MX", "Veracruz-Llave")
{ 
  name: 'Veracruz'
, code: 'VER'
, countryjs: 'Veracruz-Llave' 
}

And for all data, just use:

countryjsToPaypal.all()

Contributing

To contribute code to this module, please follow this workflow:

  1. fork the repo
  2. make sure to install dev dependencies using
npm install --dev
  1. Make the changes you desire
  2. Ensure all changes have a new test in the test/ folder, and run:
npm test
  1. After making changes in your fork, open a pull request.

Please note that if your code updates do not pass JS Standard style, mocha tests and code coverage, your PR may be rejected and you'll need to fix any issues listed in it.

Changelog

v0.1.1-v0.2 - 2019-08-09

  • Add China's provinces

v0.1-v0.1.1 - 2018-03-27

  • Initial release: mapping, test coverage, travis-ci, npm package

Disclaimer

This is being maintained in the contributor's free time, and as such, may contain minor errors in regards to some countries. The information included in this library is what is listed on PayPal's developer website:

If there is an error, please let me know and I will do my best to correct it.

Contributors

Install

npm i countryjs-states-paypal

DownloadsWeekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

43.1 kB

Total Files

20

Last publish

Collaborators

  • avatar