Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AdmitHub/carrier-gateways
Translate cell phone numbers and carriers into SMS gateway email addresses
https://github.com/AdmitHub/carrier-gateways
Last synced: 4 months ago
JSON representation
Translate cell phone numbers and carriers into SMS gateway email addresses
- Host: GitHub
- URL: https://github.com/AdmitHub/carrier-gateways
- Owner: AdmitHub
- Created: 2015-05-05T19:28:48.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2021-04-21T19:42:46.000Z (almost 4 years ago)
- Last Synced: 2024-09-21T10:16:46.507Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 6
- Watchers: 24
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Carrier Gateways
================A simple package to translate cell phone numbers and carriers into SMS gateway
email addresses. Useful for sending notifications via SMS without having to
have SMS infrastructure.Currently, the list is very US-centric, but PR's with other country's gateways
would be very welcome.Installation
------------Via npm:
npm install carrier-gateways
Usage
------ ``carrierGateways.getAddress(number, carrierName, [mms])`` - return the
email address for the given number and carrier.``number`` must be a 10-digit (US) phone number. All non-numeric digits,
and a leading US country-code is stripped out.``carrierName`` should be a name as listed in ``carrier-addresses.json``.
``mms`` - if truthy, and the carrier has a separate address for mms
messages, use that address instead.Example:
var carrierGateways = require("carrier-gateways");
// Look up an address.
carrierGateways.getAddress("801-234-5678", "Verizon");
// returns [email protected]