DTSPaste

Quality Gate Status Maintainability Rating Reliability Rating Security Rating

Port de jspaste. Pública y obtén datos de jspaste en Deno 🦕

Paquete original hecho por tnfAngel#8642 e porteado por AlexTek#0840

Documentación

Funciones

  • Publica un código a jspaste, devuelve la Key y el Secret:
import { publicar } from "https://deno.land/x/tspaste/mod.ts";

const res = await publicar("Hello, world!");

console.log(res);

/* 
{
  key: 'abcdefgh',
  secret: 'zyzasaasdtslasebjd8w9sa'
}
*/
  • Obtiene un código de jspaste, usando su Key:
import { obtener } from "https://deno.land/x/tspaste/mod.ts";

const res = await obtener("abcdefgh");

console.log(res);

/*
{ 
  key: "abcdefgh",
  data: "Hello, world!"
}
*/
  • Elimina un código de jspaste, usando su Key y Secret:
import { eliminar } from "https://deno.land/x/tspaste/mod.ts";

const res = await eliminar("abcdefgh", "zyzasaasdtslasebjd8w9sa");

console.log(res);

/*
true 
*/
  • Informacion paquete:
import { paquete } from "https://deno.land/x/tspaste/mod.ts";

const res = await eliminar("abcdefgh", "zyzasaasdtslasebjd8w9sa");

console.log(res);

/*
{
  version: "x.x.x",
  creador: "tnfAngel#8642",
  porter: "AlexTek#0840",
  creditos: [ "x", ... ],
  web: "https://jspaste.tnfangel.repl.co"
}
*/