JSPM

gulf-of-npm

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

    A simple package that returns Gulf name based on country code

    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-npm

    Usage

    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 Mexico

    API

    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