-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📚 docs: Add code sample and remove unnecessary runtime warning.
- Loading branch information
1 parent
2d653fe
commit 6a657e4
Showing
2 changed files
with
9 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' ; | ||
``` |