npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easy-dtbs

v0.0.8

Published

A set of functions with links that provide the steam API and others created by me.

Downloads

26

Readme

easy-dtbs

DOCUMENTACION INCOMPLETA REVISA EL CODIGO PARA VER TODAS LAS FUNCIONES!!!!

Install:

npm install easy-dtbs

Documentacion

Crear_base_de_datos.

var dtbs = require("easy-dtbs");

dtbs.crear("ejemplo");
dtbs.crear("poneme un nombre y no uses /");

Verificar_si_la_dtbs_existe

var dtbs = require("easy-dtbs");

dtbs.verificar("ejemplo"); 
dtbs.verificar("nombre de la dtbs"); //Retorna true si existe

Ver_base_de_datos

Recibir dtbs

var dtbs = require("easy-dtbs");

dtbs.ver("ejemplo");
dtbs.ver("nombre de la dtbs");

Recibir dtbs con un console table

var dtbs = require("easy-dtbs");

dtbs.ver("ejemplo", true);
dtbs.ver("nombre de la dtbs", true);

Agregar_datos

var dtbs = require("easy-dtbs");

dtbs.agregar("ejemplo", {"id": 1, "contenido": "Hola"});
dtbs.agregar("nombre de la dtbs", {"contenidos"});

ahora tenemos [{"id": 1, "contenido": "Hola"}] en la base de datos.

Modificar

var dtbs = require("easy-dtbs");

dtbs.modificar("ejemplo", "contenido", "Hola", "Adios");
dtbs.modificar("nombre de la dtbs", "Dato", "Valor", "Nuevo Valor");

ahora tenemos [{"id": 1, "contenido": "Adios"}] en la base de datos.

Borrar_Columna

Si ponemos la base de datos en un console.table va a tener columnas y filas.

var dtbs = require("easy-dtbs");

dtbs.borrarColumna("ejemplo", "contenido");
dtbs.borrarColumna("nombre de la dtbs", "Dato");

Borrar_Fila

Si ponemos la base de datos en un console.table va a tener columnas y filas.

var dtbs = require("easy-dtbs");

dtbs.borrarFila("ejemplo", "contenido", "Adios");
dtbs.borrarFila("nombre de la dtbs", "Dato", "valor");

Borrar_dtbs

Eliminar dtbs por completo.

var dtbs = require("easy-dtbs");

dtbs.destruir("ejemplo"); //ADIOS BASE DE DATOS PERO TARDARA 10 SEGUNDOS EN DESTRUIRSE
dtbs.destruir("nombre de la dtbs", false); //Si este valor es false la base de datos se borrara en 10 segundos y si esta en true se borrara al instante.

Ejecutar_cambios_a_la_dtbs

Ejecutar algun cambio en la dtbs pero el codigo deve escribirse como un string

var dtbs = require("easy-dtbs");

dtbs.ejecutar("ejemplo", "ejemplo.push(\"hola\")"); //ejecutamos la funcion push en la base de datos 
dtbs.ejecutar("nombre de la dtbs", "funcion");

Eventos

Los eventos son funciones que se ejecutan cuando se emiten

Modificacion

Esta funcion se ejecuta cuando la base de datos indicada se modifica.

var dtbs = require("easy-dtbs");

var control = new dtbs.eventosDtbs("nombre de la dtbs");
var dtbsApp = dtbs.dtbs;

dtbsApp.on("edit", (newDtbs, oldDtbs) => {
    console.log(newDtbs);
    console.log(oldDtbs);
});

Igualdad

Esta funcion se ejecuta cuando las dos base de datos indicadas seon iguales.

var dtbs = require("easy-dtbs");

var control = new dtbs.eventosDtbs("nombre de la dtbs 1", "nombre de la dtbs 2");
var dtbsApp = dtbs.dtbs;

dtbsApp.on("igualdad", (dtbs) => {
    console.log(dtbs);
});

Desigualdad

Esta funcion se ejecuta cuando las dos base de datos indicadas seon iguales.

var dtbs = require("easy-dtbs");

var control = new dtbs.eventosDtbs("nombre de la dtbs 1", "nombre de la dtbs 2");
var dtbsApp = dtbs.dtbs;

dtbsApp.on("desigualdad", (dtbs1, dtbs2) => {
    console.log(dtbs1);
    console.log(dtbs2);
});