Socket
Book a DemoInstallSign in
Socket

asimpledb

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asimpledb

a simple db in json to install, to uses, to read

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
2
Created
Source

asimpledb

Description

asimple db is a db in json. it was writed for simplicity liked quick.db but more easier to install

it is simple to install (no module require)

it is simple to use

it is simple to read the data without a lot of code

Install

$ npm install asimpledb

documentation

English

How to setup a database

const asimpledb = require('asimpledb') 
const db = new asimpledb('path/to/json/file',{init:true /* if the file doesnt exist */})

How to insert data on database

db.set("Data", "Anything you want here")

Write a string , an object or a array

// Output : Data : Anything you want here

How to find data on database

db.get("Data")

Return the data you given

//Output : Anything you want here

How to verify if a data is on a database

return a boolean

db.has("Data")
//Output : true

db.has("Data1")
//Output : false

Français

Comment setup une base de données

const asimpledb = require('asimpledb') 
const db = new asimpledb('chemin/du/fichier/json',{init:true /* Si le fichier n'existe pas */})

Comment insérer une donnée dans la base de données

db.set("Data", "Ce que vous voulez ici")

Écris une valeur sous la forme d'une chaine de caracètres, d'un objet ou d'un tableau

Comment trouver une donnée dans une base de données

db.get("Data")

Retourne la donné que vous avez donné au préalable

Savoir si une base de donnée possède une donnée

db.has("Data")
//Output : true

db.has("Data1")
//Output : false

retourne une bouléen

Keywords

db

FAQs

Package last updated on 23 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts