Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/afraid-owls-taste.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clear-rats-stand.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dark-maps-clap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/green-rooms-rush.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rotten-forks-tap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stale-tables-allow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tired-lights-film.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-signs-listen.md

This file was deleted.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# sortman

## 1.0.0

### Major Changes

- c194b2c: Fix readme.md
- 6e1ddda: Add contribution guide
- 507b452: Add security.md

### Patch Changes

- 3c93962: Fix sort test and sort benchmark
- cd7af65: Fix desc option in sort check 's error
- 702bef5: add option test
- 09c7e15: Add options
- 3151851: Add shell sort
- 014f39e: Delete: reference args

## 0.0.6

### Patch Changes
Expand Down
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# sortman
# `SortMan`

Sortman is sort lib in javascript.

Various sorting options are supported, including object sorting and switching between ascending and descending order.

# Installation

```console
npm install sortman
```

# Usage

```ts
Expand Down Expand Up @@ -37,6 +45,38 @@ const sorted = SortMan.sort({
console.log(sorted);
```

# Support sorts

- Bogo sort - `SortMan.bogo`
- Bubble sort - `SortMan.bubble`
- Heap sort - `SortMan.heap`
- Insertion sort - `SortMan.insertion`
- Merge sort - `SortMan.merge`
- Quick sort - `SortMan.quick`
- Selection sort - `SortMan.selection`
- Shell sort - `SortMan.shell`

# Options

## Desc

By setting it to true, the output results will be in descending order.

```ts
import { SortMan } from "sortman";

const data = [200, 300, 100];

const sorted = SortMan.sort({
arr: data,
options: {
desc: true
}
});

console.log(sorted);
```

# Repository

https://github.com/ROBOTofficial/sortman