diff --git a/README.md b/README.md index 32f650e..f4506ab 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ Iterable sorting for JavaScript. See [docs](https://iterable-iterator.github.io/sorted/index.html). -> :building_construction: Caveat emptor! This is work in progress. Code may be -> working. Documentation may be present. Coherence may be. Maybe. - -> :warning: Depending on your environment, the code may require -> `regeneratorRuntime` to be defined, for instance by importing -> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime). +```js +import {decreasing} from '@total-order/primitive'; +import {range} from '@iterable-iterator/range'; +import {sorted} from '@iterable-iterator/sorted'; +sorted(decreasing, range(13)); 12 11 10 9 8 ... +``` [![License](https://img.shields.io/github/license/iterable-iterator/sorted.svg)](https://raw.githubusercontent.com/iterable-iterator/sorted/main/LICENSE) [![Version](https://img.shields.io/npm/v/@iterable-iterator/sorted.svg)](https://www.npmjs.org/package/@iterable-iterator/sorted) diff --git a/doc/manual/usage.md b/doc/manual/usage.md index 28e2768..bf655e7 100644 --- a/doc/manual/usage.md +++ b/doc/manual/usage.md @@ -1,19 +1,8 @@ # Usage -> :warning: Depending on your environment, the code may require -> `regeneratorRuntime` to be defined, for instance by importing -> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime). - -First, require the polyfill at the entry point of your application -```js -require( 'regenerator-runtime/runtime' ) ; -// or -import 'regenerator-runtime/runtime.js' ; -``` - -Then, import the library where needed +Import the library where needed ```js -const sorted = require( '@iterable-iterator/sorted' ) ; +const {sorted} = require( '@iterable-iterator/sorted' ) ; // or -import * as sorted from '@iterable-iterator/sorted' ; +import {sorted} from '@iterable-iterator/sorted' ; ```