JSPM

geo-country-state-code-selector

0.1.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q16836F
  • License MIT

Country and State Code simple selector

Package Exports

  • geo-country-state-code-selector

Readme

Welcome to geo-country-state-code-selector 👋

Version License: MIT

Country and State Code simple selector

Prerequisites

  • node >=12

Install

yarn add geo-country-state-code-selector
npm install geo-country-state-code-selector

Usage

import GetPlaceCode from "geo-country-state-code-selector";

// No need to use perfect parameter
GetPlaceCode.getRegionCode("São Paulo"); // SP
GetPlaceCode.getRegionCode(", sao paulo"); // SP

GetPlaceCode.getPrefixedRegionCode(", State of São Paulo", "state-of"); // SP
GetPlaceCode.getPrefixedRegionCode(", State of São Paulo", "State Of"); // SP

GetPlaceCode.getCountryCode("Brazil"); // BR
GetPlaceCode.getPrefixedCountryCode("Federation of Brazil", "Federation of"); // BR

GetPlaceCode.getRegionCodeByCountry("brazil", "sao paulo"); // SP
GetPlaceCode.getPrefixedRegionCodeByCountry(
    "republic of brazil",
    "region of sao paulo",
    "republic of",
    "region of"
); // SP

Author

👤 Steinagel

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator