Skip to content

Commit 50babef

Browse files
📚 docs: Better wording for regeneratorRuntime usage.
1 parent a9b7bc7 commit 50babef

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ All methods are pure functions that do not modify their object.
3636
> The [parent project](https://github.com/aureooms/js-persistent) shows how
3737
> specialized persistent data structures can be build on top of those methods.
3838
39-
> The code requires `regeneratorRuntime` to be defined, for instance by importing
39+
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
4040
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
4141
42+
First, require the polyfill at the entry point of your application
4243
```js
44+
require( 'regenerator-runtime/runtime' );
45+
// or
4346
import 'regenerator-runtime/runtime.js' ;
4447
```
4548

doc/manual/usage.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Usage
22

3-
The code requires `regeneratorRuntime` to be defined, for instance by importing
4-
[regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
3+
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
4+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
5+
6+
First, require the polyfill at the entry point of your application
57
```js
68
require( 'regenerator-runtime/runtime' );
79
// or

0 commit comments

Comments
 (0)