From 2499f8b030911f03da87bd092cc3b47503791cdd Mon Sep 17 00:00:00 2001 From: iotcat Date: Mon, 3 Feb 2020 15:06:21 +0000 Subject: [PATCH] update usage --- README.md | 4 ++-- index.js | 2 +- package.json | 2 +- test.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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 +})();