A Node.JS API for Hastebin.
npm install @jeremyx9/hastebinnpm install @jeremyx9/hastebin.jsjs
const Hastebin = require("@jeremyx9/hastebin");
`
#### create a paste variable to configure options and create a paste
`js
const paste = new Hastebin();
`
#### create a paste and get the associated key for the paste
`js
async function createPaste() {
const url = await paste.newPaste("$world = new World();");
console.log(url); // egasiwulog -> you can set the url before (https://www.toptal.com/developers/hastebin/egasiwulog)
}
`
#### get paste with key
`js
async function getPaste() {
const data = await paste.getPaste("egasiwulog");
console.log(data); // $world = new World();
}
``