Simulation DATABASE of products
Installation
npm install dbvi
Usage
For use fake products
var data = require('dbvi');
//add a products in DataBase
//argouments (name,description,amount)
data.add('name','description',10)
//delete a products
//argouments (id) to delete
data.del(2)
//buy a products
//argouments (id,buyer)
//the products buyed will be pushed in shopping array
data.buy(1,'name of buyer')
//for show the products buyed
console.log(data.shopping)
//edit a products
//argouments (id,name, description,amount)
data.edit(1,'new Name','new Description',4)
//search products buyed by buyer
//argouments (buyer)
data.search('name of buyer')