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 4
4
Iterable sorting for JavaScript.
5
5
See [ docs] ( https://iterable-iterator.github.io/sorted/index.html ) .
6
6
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
+ ```
13
13
14
14
[ ![ License] ( https://img.shields.io/github/license/iterable-iterator/sorted.svg )] ( https://raw.githubusercontent.com/iterable-iterator/sorted/main/LICENSE )
15
15
[ ![ 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 1
1
# Usage
2
2
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
15
4
``` js
16
- const sorted = require ( ' @iterable-iterator/sorted' ) ;
5
+ const { sorted } = require ( ' @iterable-iterator/sorted' ) ;
17
6
// or
18
- import * as sorted from ' @iterable-iterator/sorted' ;
7
+ import { sorted } from ' @iterable-iterator/sorted' ;
19
8
```
You can’t perform that action at this time.
0 commit comments