hastebin.js
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

hastebin.js

A NPM package to post data to hastebin.

Example Usage

const hastebin = require('hastebin.js');
const haste = new hastebin({ /* url: 'hastebin.com */ });
 
const link = haste.post('Helllo from hastebin.js!').then(link => console.log(link));
// Will return a link such as https://hastebin.com/sofomuqifo.js
 
const raw = haste.get('rejocivu').then(raw => console.log(raw));
// Will return the contents of the haste you provide.

Documentation

Hastebin.post

Param Type Description
code string Required. The string that you want to post to Hastebin.
extension string The extension that you'd like the file to upload as. If not provided, defaults to js

Hastebin.get

Param Type Description
key string Required. The file you'd like to get from Hastebin.

Readme

Keywords

none

Package Sidebar

Install

npm i hastebin.js

Weekly Downloads

47

Version

1.3.2

License

MIT

Unpacked Size

16.2 kB

Total Files

14

Last publish

Collaborators

  • ognovuh