1.0.2 • Published 6 years ago
fake-products-db v1.0.2
get fake products
Installation
npm install fake-products-db
Usage
For use fake products
var fakeProducts = require('fake-products-db')
fakeProducts.insertProducts({name : 'Windows' , amount : 3}) // json that insert product no id because increment in the function
fakeProducts.deleteProducts(3)// id of product
fakeProducts.editProducts(1 , {name : 'Asusso' , amount : 2}) // for edit products , id and product
fakeProducts.buyProducts(2 , 'Marco') , buyProducts(2 , 'Pippo') // input id of products and name of buyer
fakeProducts.getProducts() // return all products
fakeProducts.getBuyer() // return all products purchase and them buyer