https://github.com/optionsx/hastebin_deno
https://deno.land/x/hastebin
https://github.com/optionsx/hastebin_deno
deno hastebin
Last synced: 2 months ago
JSON representation
https://deno.land/x/hastebin
- Host: GitHub
- URL: https://github.com/optionsx/hastebin_deno
- Owner: optionsx
- Created: 2023-03-02T02:00:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-26T14:09:29.000Z (almost 3 years ago)
- Last Synced: 2024-12-31T05:17:04.388Z (over 1 year ago)
- Topics: deno, hastebin
- Language: TypeScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Hastebin for Deno ](https://deno.land/x/hastebin)
```bash
deno run --allow-net https://deno.land/x/hastebin/example.ts
```
### Example code
```TS
import hasteBin from "https://deno.land/x/hastebin/mod.ts";
const theCode = `type type = {
accessToken: string;
sessionToken: string;
refresh: number;
};
const getNewToken = async (
e: string,
p: string,
): Promise => {
return (await axios.post(
"https://c1dfd63b-9ba9-44e6-ba03-5234352754b4.id.repl.co/login",
{ email: e, password: p, headers: { "Content-Type": "application/json" } },
)).data;
};
const e: type = await getNewToken(
"e@d.c",
"p",
);
console.log(e);`;
const type = "ts";
const link = await hasteBin(theCode, type); // type is optional
console.log(link);