# file-based-database-shop

> Shop made with fs module

Latest version **1.0.4** (published 2021-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install file-based-database-shop
pnpm add file-based-database-shop
yarn add file-based-database-shop
bun add file-based-database-shop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-03-21 |
| First published | 2021-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mabrur-h |
| Maintainers | mabrur-h |
| Keywords | shop, products, warhouse, database, fs |

## Links

- npm: https://www.npmjs.com/package/file-based-database-shop
- npm.io page: https://npm.io/package/file-based-database-shop

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.4 (latest) — 2021-03-21
- 1.0.3 — 2021-03-21
- 1.0.2 — 2021-03-21
- 1.0.1 — 2021-03-21
- 1.0.0 — 2021-03-21

## README

# file-based-database-shop
<hr/>

###### Warehouse manager using fs module.

## Install
<hr/> 

###### Install with npm.

```text
npm install file-based-database-shop
```
### Example Setup
<hr/>

After installing via npm, simply require the library and begin enjoying🚀
```javascript
// In your app.js file
const Shop = require('file-based-database-shop')
```

### Usage
<hr/>

After requiring add these line of codes into your project
```javascript
let keys = process.argv

;(async function () {
    let db = new Shop("warehouse");

    if (keys[2] === "--dep") {
        await db.dep(keys[3], parseInt(keys[4]));
    } else if (keys[2] === "-sell") {
        await db.sell(keys[3], parseInt(keys[4]));
    } else if (keys.length === 2) {
        await db.dash();
    }
})();
```

###### What features does our function have?

You can *add products*, *sell products* and *see stats as table*.

- **To add products run this command on your terminal or cmd:**
```text
node app.js --dep productName productCount
```
For example: 
![image](https://telegra.ph/file/16b0d297fc5fd094a4f56.png)

- **To sell products run this command on your terminal or cmd:**
```text
node app.js -sell productName productCount
```
For example:
![image](https://telegra.ph/file/9aea312bbe10ed44d5f56.png)

- **To see existing products run this command on your terminal or cmd:**
```text
node app.js
```
For example:
![image](https://telegra.ph/file/972fd884ba6ca135eb104.png)

### My github profile

###### [GitHub](https://github.com/mabrur-h)

### My telegram blog

###### [Telegram](http://t.me/mabrur_dev)

---
_Source: https://npm.io/package/file-based-database-shop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
