is a short sweet, easy, and lightweight sourcebin wrapper using nodejs
I use the unlicense
const sourcebin = require("sourcebin-lite");
(async () => {
// title, code, options
const url = await sourcebin.create("title", "code", {
title: "title",
description: "description",
});
console.log(url);
// returns "https://sourceb.in/key"
})();
const sourcebin = require("sourcebin-lite");
(async () => {
// title, code, options
const url = await sourcebin.create("title", "code", {
title: "title",
description: "description",
});
console.log(url);
// returns "https://sourceb.in/key"
})();
const sourcebin = require("sourcebin-lite");
// you just put in the url of the sourcebin
const key = sourcebin.get_key("https://sourceb.in/key");
console.log(key);
// returns "key"
const sourcebin = require("sourcebin-lite");
// you can get the key from document 2
const key = "some key";
// default method
const url1 = sourcebin.url(key);
// returns "https://sourceb.in/key"
// short url method
const url2 = sourcebin.url.short(key);
// returns "https://srcb.in/key"
//
// you can also do sourcebin.short_url and it works the same way
// long url method
const url3 = sourcebin.url.long(key);
// returns "https://sourceb.in/key"
//
// you can also do sourcebin.long_url and it works the same way
const sourcebin = require("sourcebin-lite");
const key = "some key";
// get a key in documentation 2
const text = await read(key, { enableLogs: false });
// all of the text content from the files