install npm
npm i data-base-local-storage-by-kamina
Setup process
When you have installed via npm, simply require the library and begin enjoying🚀
// const Shop = require('data-base-local-storage-by-kamina')
How To Use ??
Then, add following js codes so as to set up your project
let index = process.argv
;(async function () {
let db = new Storage('storage')
if (index[2] === "--dep") {
await db.dep(index[3], parseInt(index[4]));
} else if (index[2] === "--sell") {
await db.sell(index[3], parseInt(index[4]));
} else if (index.length === 2) {
await db.dash();
}
})();
Meaning of above function:
dep() - adding products to the storage. sell() - selling products from the storage and calculate how many products are left in a table. dash() - calling table by using just main.js.