Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

luma-db

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luma-db

Luma-db is a powerful online database

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

⎛ℹ️⎞ About

Luma Package it's a unique package made by Jeotique that allows you to create online database...


⎜📥⎟ Installation

Open your application's terminal and type:

$ npm install luma-db

⎜➡️⎟ Usage

How to use :

First step you need to declare your tables (yes before the database.) :

const {Table} = require('luma-db')
const table1 = new Table("table1") //in option you need to put the table name
const table2 = new Table("table2")

After that you can declare your database :

const {Database} = require('luma-db')
const myDb = new Database({
    name: "my_new_database", //this is the name of the database, if the database name is already used you will get an error.
    password: "myStrongPass", //this is the password of the database
    tables: [table1, table2] //here you put your table
})

And now you are ready to use your new database system :

table1.set('message', 'hello world').save()
console.log(table1.get('message')) //hello world

All functions :

<table>.has('key') //will return true if the key exist in the table and false if not
<table>.get('key') //will return the value where the key is 'key' or undefined if doesn't exist
<table>.get('key', true, 'hello i am a key') //will return the value where the key is 'key' or if the key doesn't exist she will be created with the value 'hello i am a key'
<table>.set('key', 'im always a key') //will set the value 'im always a key' where key is 'key'
<table>.tempo('key', 'im here for 3sec', '3s') //will set the value 'im here for 3sec' and delete it after 3sec
<table>.push('key', 'blabla') //will push in the array 'blabla' where key is 'key' (the value will be created if the key 'key' was not existing with a default value of [])
<table>.remove('key', 'blabla') //reverse of 'push'
<table>.add('key', 2) //will add 2 where the key is 'key' (the value need to be an integer, the value will be created if the key 'key' was not existing with a default value of 0)
<table>.subtrack('key', 2) //reverse of 'add'
<table>.all() //will return all values of the table
<table>.delete('key') //will delete the value where the key is 'key'
<table>.clear() //will delete everything in the table
<table>.save() //save the table in the online database

⎝🔶⎠ Contact us

In case you have idea's to improve the package, or maybe you found some bugs or you need help, you can contact us from our discord server!


Discord support server

Keywords

FAQs

Package last updated on 10 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc