-
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.
♻️ refactor: Fix function signature and avoid regenerator-runtime.
- Loading branch information
1 parent
2f13e63
commit b7b8c72
Showing
4 changed files
with
6 additions
and
21 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 consume = require( '@iterable-iterator/consume' ) ; | ||
const {consume, exhaust} = require( '@iterable-iterator/consume' ) ; | ||
// or | ||
import * as consume from '@iterable-iterator/consume' ; | ||
import {consume, exhaust} from '@iterable-iterator/consume' ; | ||
``` |
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