New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

smsir_mh_js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smsir_mh_js - npm Package Compare versions

Comparing version 1.0.2 to 1.0.4

SendAlertSMSIR.spec.js

9

package.json
{
"name": "smsir_mh_js",
"version": "1.0.2",
"description": "This package is for using SMS service from sms.ir should get API and templetId from sms.ir ",
"version": "1.0.4",
"description": "This package is for using SMS service from sms.ir should get API and templetId from sms.ir javaScript,ES6 support ",
"main": "smsir_mh_js.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest"
},

@@ -22,3 +22,6 @@ "repository": {

"axios": "^1.7.2"
},
"devDependencies": {
"jest": "^29.7.0"
}
}

@@ -6,4 +6,19 @@ # smsir_mh_js

## Test Resalt
npm test
PASS ./SendAlertSMSIR.spec.js
SendAlertSMSIR
√ should send a POST request with correct data (5 ms)
√ should log an error if the request fails
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 0.78 s
Ran all test suites.
## Author
Mohammad Hadi

@@ -15,2 +30,4 @@ Email: mmm.6336@gmail.com

## Installation
for install last vertion
`npm install smsir_mh_js@latest`

@@ -25,2 +42,3 @@ To install the package, run:

#yarn

@@ -31,2 +49,3 @@ yarn add axios

# Example use:

@@ -33,0 +52,0 @@

const axios = require('axios');
const SendAlertSMSIR = (to, message, api_key, templateId) => {
const SendAlertSMSIR = async (to, message, api_key, templateId) => {
const data = JSON.stringify({

@@ -23,9 +23,8 @@ "mobile": to,

axios(config)
.then(response => {
console.info(JSON.stringify(response.data));
})
.catch(error => {
console.error(error);
});
try {
const response = await axios(config);
console.info(JSON.stringify(response.data));
} catch (error) {
console.error(error);
}
};

@@ -32,0 +31,0 @@

const { SendAlertSMSIR } = require('./smsir_mh_js');
const apiKey = '1212121212121212121'; //Example API Key get from sms.ir
const apiKey = '121212121212121212121'; //Example API Key
const to = '09100059323'; //Example Phone Number

@@ -5,0 +5,0 @@ const message = 'Hello,this test message!'; //Max 24 Character Length

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc