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

piverdb

v1.1.3

Published

Database Modul

Downloads

2

Readme

piverdb

MADE İN TURKEY DATABASE MODULE

for download

npm install --save piverdb

USE


const PiverDB = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
}
const db = new PiverDB.Database(dbOptions)
Error Fixedd!
Added Function
db.findAndUpdate("push","push_value")
 // "demo":["test1","test2"] db.getTO("demo","test1") true/false

EXAMPLE

//language = English
db.has('test') /* Checks Specified Data */
db.get("data") /* Finds the specified data */
db.push("1",2) /*  */
db.unpush("1",2) /*  */
db.set("data","symptom") /* database writes data */
db.delete("data") /* delete from database */
db.backup("data") /* backs up the file with the specified name */
db.add("xp",1) /* Adds the number of the specified data with the specified number */
db.remove("xp",1) /* Subtracts the number of the specified data with the specified number */
db.findAndUpdate("push","push_value") // "demo":["test1","test2"] db.getTO("demo","test1") true/false
db.all() /* Shows Data in Database File */
db.deleteAll() /* Database Reset */

SET CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
db.set("Data",`Sample`) /* find from database */
console.log(db.get("Data"))
// CONSLOE => Sample

DELETE CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
db.delete("data") /* delete from database */

HAS CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
if(db.has('PiverDB')){ /* check database */
    var PiverDB = db.get('Piverdb') /* If there is data, send the specified data to the console */
} else {
    var PiverDB = "!" /* If no data, set the data to "!" set to */
}
console.log(PiverDB) /*Sends Prefix*/

//veri yok ise KONSOL => !
//veri var ise KONSOL => <veri>

GET CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
/*{"veri":"TEST"}*/
console.log(db.get("veri"))

//CONSOLE => TEST

BACKUP CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
db.backup("veri") /* backs up the file with the specified name */

ALL CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
let all = db.all() /* Show Data in Database File  */
console.log(all)
//KONSOL => { "stated": "veri", "stated2": "veri2", "stated3": "veri3", "stated4": "veri4", "stated5": "veri5"}

PUSH CODE

db.push("1",2)
//Database => 
{
         "1": [
             2
         ]
}

UNPUSH CODE

db.unpush("1",2)
//Old_Database => 
{
         "1": [
             2
         ]
}
//Old_Database => 
{
         "1": []
}

DELETEALL CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
db.deleteall() /* Database ALL DELETE */

ALL CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
// DATABASE => {"veri":9}
db.add("puan",1) /* Belirtilen verinin numarasını Belirtilen Sayı İle Toplar */
// OLD DATABASE => {"veri":9}
// NEW DATABASE => {"veri":10}

REMOVE CODE

const { Database } = require("piverdb")
const dbOptions = {
    "file":"database",
    "autoFile": true,
    "jsonspaces": 5
}
const db = new Database(dbOptions)
// DATABASE => {"veri":10}
db.remove("puan",5) /* Belirtilen verinin numarasını Belirtilen Sayı İle Çıkartır */
// OLD DATABASE => {"veri":10}
// NEW DATABASE => {"veri":5}