You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jad-db

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jad-db

Una base de datos en formato JSON.

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Una base de datos en formato JSON.

NPM Version NPM Install Size NPM License

Inicio rapido

1. Instalar el paquete

$ npm i jad-db

2. Usar la configuracion

Crea un archivo jad.config.json en tu directorio de trabajo de lo contrario se creara el archivo jad.db.json en tu directorio de trabajo.

{
  "jadDbPath": "src/db/",
  "jadDbName": "jad.db.json"
}

3. Crear el modelo de tabla (ES6 module syntax)

import jad from 'jad-db'

const Products = jad({
  tableName: 'products',
})

export default Products

o en CommonJS

const jad = require('jad-db')

const Products = jad({
  tableName: 'products',
})

module.exports = Products

Uso del modelo

import Products from './src/models/Products'

async function getProducts() {
  return await Products.get()
}

Metodos

Estos son lo metodos que tiene la clase

  • get()
  • getById()
  • create()
  • update()
  • deleteById()

Keywords

json

FAQs

Package last updated on 12 Jul 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