diff --git a/README.md b/README.md index f4171be..c9142b1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ### Import sms module ```js -const sms = require('ushio-sms').sms(API_url); //substitute the API_url +const sms = require('ushio-sms')(API_url); //substitute the API_url ``` @@ -17,4 +17,4 @@ await sms.send(Tel, Msg0, Msg1); ## License -Apache-2.0 \ No newline at end of file +Apache-2.0 diff --git a/index.js b/index.js index 5b3bf91..82c18e2 100644 --- a/index.js +++ b/index.js @@ -21,5 +21,5 @@ var sms = (url) => { } -exports.sms = sms; +module.exports = sms; diff --git a/package.json b/package.json index f6c261b..5973ce3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ushio-sms", - "version": "1.0.0", + "version": "1.0.2", "description": "sms for ushio", "main": "index.js", "scripts": { diff --git a/test.js b/test.js index 8c24969..626389a 100644 --- a/test.js +++ b/test.js @@ -1,5 +1,5 @@ -const sms = require('./index.js').sms('https://api.yimian.xyz/sms/'); +const sms = require('./index.js')('https://api.yimian.xyz/sms/'); (async () => { console.log(await sms.send('18118155257', 'test', 'send')); -})(); \ No newline at end of file +})();