1.0.0 • Published 5 years ago

hasteditor v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

hasteditor

A simple hastebin document reader and generator

Installation

# Using yarn
yarn add hasteditor

# Using npm
npm install hasteditor

How to use

const hasteditor = require('hasteditor');

// Creating hastebin documents
hasteditor.create('test').then(document => {
// document will like https://hasteb.in/otobehuq.txt
}).catch(error => {
console.log(error)
})

// You can use options for uploading hastebin.com
hasteditor.create('test', { url: "https://hastebin.com", extension: "bash" }).then(document => {
// document will like https://hastebin.com/imasusobas.bash
}).catch(error => {
console.log(error)
})

// Reading hastebin documents
hasteditor.read('https://hasteb.in/otobehuq.txt').then(text => {
// text will be "test"
}).catch(error => {
console.log(error)
})

// parsing links
hasteditor.parseURL('https://hasteb.in/otobehuq.txt').then(data => {
// data will be { url: "https://hasteb.in/", key: "otobehuq.txt" }
}).catch(error => {
console.log(error)
})

If you're having problem you can contact me with joining my discord server