Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: align type declaration with latest improvement #132 #211

Merged
merged 1 commit into from
Sep 16, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ orderBy<T>(

| Type | Value |
| :-------------- | :----------------------------------------------------------------------------------- |
| `Identifier<T>` | <code>string &#124; number &#124; (value: T) => unknown</code> |
| `Identifier<T>` | <code>keyof T &#124; number &#124; (value: T) => unknown</code> |
| `Order` | <code>'asc' &#124; 'desc' &#124; (valueA: unknown, valueB: unknown) => number</code> |

#### Description
Expand Down
12 changes: 7 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<h1>natural-orderby</h1>
# Welcome to 🌲 natural-orderby

> Lightweight (< 1.6kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.
Lightweight (< 1.6kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.

[![npm](https://img.shields.io/npm/v/natural-orderby.svg)](https://www.npmjs.com/package/natural-orderby)
[![Build Status](https://travis-ci.org/yobacca/natural-orderby.svg?branch=master)](https://travis-ci.org/yobacca/natural-orderby) [![codecov](https://codecov.io/gh/yobacca/natural-orderby/branch/master/graph/badge.svg)](https://codecov.io/gh/yobacca/natural-orderby) [![dependencies](https://david-dm.org/yobacca/natural-orderby.svg)](https://david-dm.org/yobacca/natural-orderby)
[![npm version](https://img.shields.io/npm/v/natural-orderby.svg)](https://www.npmjs.com/package/natural-orderby)
[![downloads](https://img.shields.io/npm/dm/natural-orderby.svg)](https://www.npmjs.com/package/natural-orderby)
[![CI](https://github.com/yobacca/natural-orderby/workflows/CI/badge.svg)](https://github.com/yobacca/natural-orderby/actions)
[![coverage](https://img.shields.io/codecov/c/github/yobacca/natural-orderby.svg)](https://codecov.io/gh/yobacca/natural-orderby)

People sort strings containing numbers differently than most sorting algorithms, which sort values by comparing strings in Unicode code point order. This produces an ordering that is inconsistent with human logic.

Expand Down Expand Up @@ -147,7 +149,7 @@ orderBy<T>(

| Type | Value |
| :-------------- | :----------------------------------------------------------------------------------- |
| `Identifier<T>` | <code>string &#124; number &#124; (value: T) => unknown</code> |
| `Identifier<T>` | <code>keyof T &#124; number &#124; (value: T) => unknown</code> |
| `Order` | <code>'asc' &#124; 'desc' &#124; (valueA: unknown, valueB: unknown) => number</code> |

#### Description
Expand Down