Skip to content

Commit

Permalink
Release version 0.4.0 with typescript code base
Browse files Browse the repository at this point in the history
  • Loading branch information
giapdong committed Feb 7, 2021
1 parent 7dd4d73 commit 39e1583
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@

Module/CLI application management storage your disk

Typescript code-base

## Installation

```bash
# yarn
$ yarn add disk-management
#npm
$ npm install disk-management
npm install disk-management # Or yarn add disk-management
```

## Table of Contents
Expand All @@ -40,6 +39,7 @@ $ npm install disk-management
</ul>
</li>
<li><a href="#cli">CLI</a></li>
<li><a href="#issues">Issues</a></li>
</ul>

## Importing
Expand All @@ -51,7 +51,7 @@ const DiskManagement = require("disk-management");
If you need micro function, import with ES6 systax

```javascript
const { color, ScanMode, Scan, Compare } = require("disk-management");
const { ScanMode, Scan, Compare } = require("disk-management");
```

## Usage
Expand Down Expand Up @@ -86,20 +86,23 @@ node run.js

### Scan

`Scan(directory, threshold, mode)`

@directory: `String` Path to root directory you want scan

@threshold: `Number` Minimum number(Bytes) you want application filter your child folder
`Scan(directory?, threshold?, mode?)`

@[mode](#scanmode): `ScanMode` Mode to scan
| Parameter | Type | Description | Default Value |
| --------- | -------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| directory | string | Path to root directory you want scan | \_\_dirname of this module (most case it has value: ./node_modules/disk-management) |
| threshold | number | Minimum number(Bytes) you want application filter your child folder | 1000000 |
| mode | ScanMode | [ScanMode](#scanmode) Mode you want scan | ScanMode.Normal |

### Compare

`Compare(threshold)`
`Compare(threshold?, pathToSourceFile?, pathToTargetFile?)`

@threshold: `Number` Minimum file size changed of each File same position
Default compare two last time
| Parameter | Type | Description | Default Value |
| ---------------- | ------ | ----------------------------------------------------- | ------------------------- |
| threshold | number | Minimum file size changed of each File same position | 1000000 |
| pathToSourceFile | string | Path to source file you want compare with target file | 2nd from last in scan dir |
| pathToTargetFile | string | Path to target file you want compare | 1nd from last in scan dir |

### ScanMode

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "disk-management",
"version": "0.3.3",
"version": "0.4.0",
"description": "Module/application for management your disk",
"main": "index.js",
"license": "MIT",
Expand Down

0 comments on commit 39e1583

Please sign in to comment.