diff options
| author | Alejandro Sior <aho@sio.be> | 2021-02-19 11:43:18 +0100 |
|---|---|---|
| committer | Alejandro Sior <aho@sio.be> | 2021-02-19 11:43:18 +0100 |
| commit | 405051211d60afa8a7fc4fc3fa5ffb456242973d (patch) | |
| tree | dbae34350c3a54f422da70f1b7fbd857a8f5a116 /src/Hastebin.js | |
initial commit
Diffstat (limited to 'src/Hastebin.js')
| -rw-r--r-- | src/Hastebin.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Hastebin.js b/src/Hastebin.js new file mode 100644 index 0000000..1d7bae0 --- /dev/null +++ b/src/Hastebin.js @@ -0,0 +1,6 @@ +const superagent = require('superagent'); + +module.exports = async function hastebin(text) { + let res = await superagent.post('https://hasteb.in/documents').send(text); + return JSON.parse(res.text).key; +};
\ No newline at end of file |
