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

lweaxodb

v0.0.6

Published

İşinize Yarıcak Database Modülü

Downloads

9

Readme

lweaxodb

NPM Downloads by package author NPM Downloads by package author NPM Downloads by package author

What's new in 0.0.6?

  • The web panel has been removed.
  • NPM bugs have been fixed (2x).
  • Bugs and issues related to Mongoose and NPM have been fixed.

Bir Sorunuz Olursa Veya Beni Desteklemek İçin Discord Sunucuma Katılın.

Examples

(QuickDB) Moving Everything to lweaxodb

const db = require("lweaxodb");
const quickdb = require("quick.db");

await db.move(quickdb)

(JsonDB) Moving Everything to MongoDB

const db = require("lweaxodb");
db.setAdapter("mongo", {url: "YOUR_MONGO_URL", Schema: "Schema Name"})
const JsonDB = require("../your_file.json");

db.moveToMongo(JsonDB)
//Github: LWEAXO

Example

const db = require("lweaxodb")

db.set("x.y.z", "abc") // abc

db.get("x") // {y: {z: "abc"}}
db.fetch("x") // {y: {z: "abc"}}
db.all() // {x: {y: {z: "abc"}}}

db.push("a", "hello") //  ["hello"]
db.push("a", "world") //  ["hello", "world"]
db.unpush("a", "hello") // ["world"]

db.push("b", {test: "lweaxodb"}) // [{test: "lweaxodb"}]
db.push("b", {test2: "lweaxodb2"}) // [{test: "lweaxodb"}, {test2: "lweaxodb2"}]
db.delByPriority("b", 1) // [{test2: "lweaxodb"}]
db.setByPriority("b", {newtest:"hey this is edited"}, 1) // [{newtest:"hey this is edited"}]

db.has("x") // true
db.delete("x") // true
db.deleteAll() // true

MongoDB if you find any bugs join my Discord)

const db = require("lweaxodb")
db.setAdapter("mongo", 
{
    url: "Your Mongo URL", 
    schema: "Schema Name" // Not required. You can't define your own schema. Just name.
})

await db.set("x.y.z", "abc") // abc

await db.get("x") // {y: {z: "abc"}}
await db.fetch("x") // {y: {z: "abc"}}
await db.all() // {x: {y: {z: "abc"}}}

await db.push("a", "hello") //  ["hello"]
await db.push("a", "world") //  ["hello", "world"]
await db.unpush("a", "hello") // ["world"]

await db.push("b", {test: "lweaxodb"}) // [{test: "lweaxodb"}]
await db.push("b", {test2: "lweaxodb2"}) // [{test: "lweaxodb"}, {test2: "lweaxodb2"}]
await db.delByPriority("b", 1) // [{test2: "lweaxodb"}]
await db.setByPriority("b", {newtest:"hey this is edited"}, 1) // [{newtest:"hey this is edited"}]

await db.has("x") // true
await db.delete("x") // true
await db.deleteAll() // true

Example With Options

const db = require("lweaxodb")
db.setReadable(true) // It makes readable your JSON DB file.
db.noBlankData(true) // If you delete anything from object and new object size is less than 1, automaticly removes that object.
db.setAdapter("yamldb") // It makes adapter as YAML adapter. Default adapter is JsonDB
db.setFolder("folder") // You can set database folder name
db.setFile("db") // You can set database file name
db.setCheckUpdates(true) // It warns you if any updates happens.

db.set("x.y.z", "abc") // abc

db.get("x") // {y: {z: "abc"}}
db.fetch("x") // {y: {z: "abc"}}
db.all() // {x: {y: {z: "abc"}}}

db.push("a", "hello") //  ["hello"]
db.push("a", "world") //  ["hello", "world"]
db.unpush("a", "hello") // ["world"]

db.push("b", {test: "lweaxodb"}) // [{test: "lweaxodb"}]
db.push("b", {test2: "lweaxodb2"}) // [{test: "lweaxodb"}, {test2: "lweaxodb2"}]
db.delByPriority("b", 1) // [{test2: "lweaxodb"}]
db.setByPriority("b", {newtest:"hey this is edited"}, 1) // [{newtest:"hey this is edited"}]

db.has("x") // true
db.delete("x") // true
db.deleteAll() // true

DB Stats

const db = require("lweaxodb")

console.log(db.size) // DB Size | DB Boyutu
console.log(db.version) // DB version | DB sürümü

If you've any question, you can join to my Discord server: Click me!

Sorunuz Olursa Discord Sunucuma Gelebilirsiniz. Bana Tıkla!


İletişim Bilgileri;