File tree Expand file tree Collapse file tree 2 files changed +9
-20
lines changed Expand file tree Collapse file tree 2 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 44Iterable sorting for JavaScript.
55See [ docs] ( https://iterable-iterator.github.io/sorted/index.html ) .
66
7- > : building_construction : Caveat emptor! This is work in progress. Code may be
8- > working. Documentation may be present. Coherence may be. Maybe.
9-
10- > : warning : Depending on your environment, the code may require
11- > ` regeneratorRuntime ` to be defined, for instance by importing
12- > [ regenerator-runtime/runtime ] ( https://www.npmjs.com/package/regenerator-runtime ) .
7+ ``` js
8+ import { decreasing } from ' @total-order/primitive ' ;
9+ import { range } from ' @iterable-iterator/range ' ;
10+ import { sorted } from ' @iterable-iterator/sorted ' ;
11+ sorted (decreasing, range ( 13 )); 12 11 10 9 8 ...
12+ ```
1313
1414[ ![ License] ( https://img.shields.io/github/license/iterable-iterator/sorted.svg )] ( https://raw.githubusercontent.com/iterable-iterator/sorted/main/LICENSE )
1515[ ![ Version] ( https://img.shields.io/npm/v/@iterable-iterator/sorted.svg )] ( https://www.npmjs.org/package/@iterable-iterator/sorted )
Original file line number Diff line number Diff line change 11# Usage
22
3- > :warning : Depending on your environment, the code may require
4- > ` regeneratorRuntime ` to be defined, for instance by importing
5- > [ regenerator-runtime/runtime] ( https://www.npmjs.com/package/regenerator-runtime ) .
6-
7- First, require the polyfill at the entry point of your application
8- ``` js
9- require ( ' regenerator-runtime/runtime' ) ;
10- // or
11- import ' regenerator-runtime/runtime.js' ;
12- ```
13-
14- Then, import the library where needed
3+ Import the library where needed
154``` js
16- const sorted = require ( ' @iterable-iterator/sorted' ) ;
5+ const { sorted } = require ( ' @iterable-iterator/sorted' ) ;
176// or
18- import * as sorted from ' @iterable-iterator/sorted' ;
7+ import { sorted } from ' @iterable-iterator/sorted' ;
198```
You can’t perform that action at this time.
0 commit comments