Package Exports
- gulf-of-npm
- gulf-of-npm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulf-of-npm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulf-of-npm
A simple npm package that returns the appropriate Gulf name based on a country code.
Installation
npm install gulf-of-npmUsage
const getGulfName = require('gulf-of-npm');
// For US
console.log(getGulfName('US')); // Output: Gulf of America
// For any other country
console.log(getGulfName('MX')); // Output: Gulf of MexicoAPI
getGulfName(countryCode)
Parameters
countryCode(string): A two-letter ISO country code
Returns
- Returns 'Gulf of America' if the country code is 'US'
- Returns 'Gulf of Mexico' for all other country codes
Throws
- TypeError: If the input is not a string
License
MIT