Socket
Socket
Sign inDemoInstall

free-mobile-api-node

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

14

index.js

@@ -1,7 +0,11 @@

async function FreeMobileSms(user, pass, message) {
export default async function FreeMobileSms(user, pass, message) {
if (!user || !pass || !message) {
return new Error('Missing user, pass or message')
}
const url = `https://smsapi.free-mobile.fr/sendmsg?user=${user}&pass=${pass}&msg=${encodeURIComponent(message)}`
const response = await fetch(url, { mode: 'no-cors' })
const err = response.error
const err = response.error || response.headers.get('X-Error')

@@ -12,5 +16,3 @@ if (err) {

return true
}
module.exports = FreeMobileSms
return new Response(response, { status: 200 })
}
{
"name": "free-mobile-api-node",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Node.js module to send SMS using the Free Mobile API",

@@ -5,0 +5,0 @@ "main": "index.js",

# free-mobile-api-node
A Node.js module to send SMS using the Free Mobile API
A Node.js module to send SMS using the Free Mobile API
## Usage/Examples
```bash
npm i free-mobile-api-node
```
```javascript
import FreeMobileSms from 'free-mobile-api-node'
FreeMobileSms(user_id, pass, message)
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc