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 🙏

© 2026 – Pkg Stats / Ryan Hefner

simple-txt-db

v1.0.2

Published

> Banco de dados TXT leve para Node.js > Simples. Rápido. Sem dependências.

Readme

Simple-DB

Banco de dados TXT leve para Node.js
Simples. Rápido. Sem dependências.

Site oficial: https://simpledb.xyz/


📦 Instalação

Via npm:

npm install simple-txt-db

🚀 Começando Rápido

const { SimpleDB } = require("simple-txt-db")

const db = new SimpleDB({
  SimplePATH: "./database/users.txt"
})

db.set("Mensagem", "Olá")
db.push("users", "user1")
db.add("totalde_Users", 1)

console.log(db.get("users"))

📄 Formato do Banco

Seu arquivo .txt ficará assim:

Mensagem="Olá"
totalde_Users=2
users=["user1","user2"]

Formato simples baseado em chave=valor com suporte a JSON.


🧠 Recursos

  • ✅ Armazenamento chave-valor
  • ✅ Suporte a arrays
  • ✅ Suporte a números, strings e objetos
  • ✅ Criação automática do arquivo
  • ✅ Sistema de escrita segura (anti-corrupção)
  • ✅ Extremamente leve
  • ❌ Sem dependências externas

📚 Métodos Disponíveis

set(chave, valor)

Define um valor.

db.set("nome", "Inbiza")

get(chave)

Obtém um valor.

db.get("nome")

has(chave)

Verifica se a chave existe.

db.has("nome")

delete(chave)

Remove uma chave.

db.delete("nome")

clear()

Limpa todo o banco.

db.clear()

push(chave, valor)

Adiciona um valor em um array.

db.push("users", { userid: 1 })

Resultado no arquivo:

users=[{ "userid": 1 }]

pull(chave, callback)

Remove itens de um array com base em uma condição.

db.pull("users", user => user === "user1")

add(chave, número)

Incrementa um valor numérico.

db.add("totalde_Users", 1)

array(chave, valor)

Adiciona um valor em um array.

db.push("users", "user1")

Resultado no arquivo:

users=["user1"]

🔐 Sistema de Escrita Segura

O Simple-DB grava primeiro em um arquivo temporário antes de substituir o original, reduzindo o risco de corrupção de dados.


🏗️ Quando usar o Simple-DB?

Ideal para:

  • 🤖 Bots de Discord
  • 🌐 APIs pequenas
  • 📚 Projetos de estudo
  • 🧪 Protótipos rápidos
  • 🚀 Sistemas simples que não precisam de banco pesado

⚠️ Limitações

O Simple-DB é recomendado para aplicações pequenas e médias.
Para sistemas de grande escala, considere usar MongoDB, PostgreSQL ou outro banco robusto.


🛣️ Roadmap

  • [ ] Versão totalmente assíncrona
  • [ ] Suporte a chaves aninhadas (ex: users.0.nome)
  • [ ] Suporte a múltiplos bancos
  • [ ] Watch mode (atualização automática)
  • [ ] Suporte oficial a TypeScript

📄 Licença

MIT License


👑 Autor

Criado por inbiza
https://simpledb.xyz/