make-your-mini-base-7
v1.0.0
Published
make mini databse
Downloads
2
Readme
make-your-mini-base-7
Ps: This package will help you build a small database
Install
npm install make-your-mini-base-7
Import
const YourBase = require("make-your-mini-base-7");
Usage
You should add these line codes to your main javascript file in order to use package
const warehouse = new YourBase(/*filename*/);
//You need several variables to run the program on the terminal
const comand = process.argv[2];
const name = process.argv[3];
const count = process.argv[4];
//write code
if(comand === "dash"){
//you use the warehouse dash method
warehouse.dash(0) /*
This function takes two different numbers as arguments 0 and 1
Returns the products in the database if you enter 0
If you enter 1, it returns the products sold from the database
*/
} else if(comand === '--dep'){
warehouse.dep(/*productName*/, /*count*/);
// This function accepts two arguments. ProductName and count.
} else if(comand === "-sell"){
warehouse.sell(/*productName*/, /*count*/)
}