node-addon-api 1.6.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.travis.yml CHANGED
@@ -12,20 +12,17 @@ env:
12
12
  # https://github.com/jasongin/nvs/blob/master/doc/CI.md
13
13
  - NVS_VERSION=1.4.2
14
14
  matrix:
15
- - NODEJS_VERSION=node/4
16
15
  - NODEJS_VERSION=node/6
17
16
  - NODEJS_VERSION=node/8
18
- - NODEJS_VERSION=node/9
19
17
  - NODEJS_VERSION=node/10
20
- - NODEJS_VERSION=chakracore/8
21
- - NODEJS_VERSION=chakracore/10
18
+ - NODEJS_VERSION=node/12
19
+ - NODEJS_VERSION=node/13
22
20
  - NODEJS_VERSION=nightly
23
- - NODEJS_VERSION=chakracore-nightly
24
21
  matrix:
25
22
  fast_finish: true
26
23
  allow_failures:
27
24
  - env: NODEJS_VERSION=nightly
28
- - env: NODEJS_VERSION=chakracore-nightly
25
+ - env: NODEJS_VERSION=node/6
29
26
  sudo: false
30
27
  cache:
31
28
  directories:
@@ -60,6 +57,6 @@ script:
60
57
  # Travis CI sets NVM_NODEJS_ORG_MIRROR, but it makes node-gyp fail to download headers for nightly builds.
61
58
  - unset NVM_NODEJS_ORG_MIRROR
62
59
 
63
- - npm test $NPMOPT
60
+ - npm test
64
61
  after_success:
65
62
  - cpp-coveralls --gcov-options '\-lp' --build-root test/build --exclude test
package/CHANGELOG.md CHANGED
@@ -1,5 +1,125 @@
1
1
  # node-addon-api Changelog
2
2
 
3
+ ## 2019-11-21 Version 2.0.0, @NickNaso
4
+
5
+ ### Notable changes:
6
+
7
+ #### API
8
+
9
+ - Added `Napi::AsyncProgressWorker` api.
10
+ - Added error checking on `Napi::ThreadSafeFunction::GetContext`.
11
+ - Added copy constructor to `Napi::ThreadSafeFunction`.
12
+ - Added `Napi::ThreadSafeFunction::Ref` and `Napi::ThreadSafeFunction::Unref` to `Napi::ThreadSafeFunction`.
13
+ - Added `Napi::Object::AddFinalizer` method.
14
+ - Use `napi_add_finalizer()` to attach data when building against N-API 5.
15
+ - Added `Napi::Date` api.
16
+ - Added `Napi::ObjectWrap::Finalize` method.
17
+
18
+ #### Documentation
19
+
20
+ - Added documentation for `Napi::AsyncProgressWorker`.
21
+ - Improve `Napi::AsyncWorker` documentation.
22
+ - Added documentation for `Napi::Object::AddFinalizer` method.
23
+ - Improved documentation for `Napi::ThreadSafeFunction`.
24
+ - Improved documentation about the usage of CMake as build tool.
25
+ - Some minor corrections all over the documentation.
26
+
27
+ #### TEST
28
+
29
+ - Added test cases for `Napi::AsyncProgressWorker` api.
30
+ - Added test cases for `Napi::Date` api.
31
+ - Added test cases for new features added to `Napi::ThreadSafeFunction`.
32
+
33
+ ### Commmits
34
+
35
+ * [[`c881168d49`](https://github.com/nodejs/node-addon-api/commit/c881168d49)] - **tsfn**: add error checking on GetContext (#583) (Kevin Eady) [#583](https://github.com/nodejs/node-addon-api/pull/583)
36
+ * [[`24d75dd82f`](https://github.com/nodejs/node-addon-api/commit/24d75dd82f)] - Merge pull request #588 from NickNaso/add-asyncprogress-worker-readme (Nicola Del Gobbo)
37
+ * [[`aa79e37b62`](https://github.com/nodejs/node-addon-api/commit/aa79e37b62)] - Merge pull request #587 from timrach/patch-1 (Nicola Del Gobbo)
38
+ * [[`df75e08c2b`](https://github.com/nodejs/node-addon-api/commit/df75e08c2b)] - **tsfn**: support direct calls to underlying napi\_tsfn (Kevin Eady) [#58](https://github.com/nodejs/node-addon-api/pull/58)
39
+ * [[`2298dfae58`](https://github.com/nodejs/node-addon-api/commit/2298dfae58)] - **doc**: Added AsyncProgressWorker to readme (NickNaso)
40
+ * [[`b3609d33b6`](https://github.com/nodejs/node-addon-api/commit/b3609d33b6)] - Fix return type and declaration of setter callback (Tim Rach)
41
+ * [[`295e560f55`](https://github.com/nodejs/node-addon-api/commit/295e560f55)] - **test**: improve guards for experimental features (legendecas)
42
+ * [[`2e71842f63`](https://github.com/nodejs/node-addon-api/commit/2e71842f63)] - **tsfn**: Implement copy constructor (Kevin Eady) [#546](https://github.com/nodejs/node-addon-api/pull/546)
43
+ * [[`650562cab9`](https://github.com/nodejs/node-addon-api/commit/650562cab9)] - **src**: implement AsyncProgressWorker (legendecas) [#529](https://github.com/nodejs/node-addon-api/pull/529)
44
+ * [[`bdfd14101f`](https://github.com/nodejs/node-addon-api/commit/bdfd14101f)] - **src**: attach data with napi\_add\_finalizer (Gabriel Schulhof) [#577](https://github.com/nodejs/node-addon-api/pull/577)
45
+ * [[`9e955a802b`](https://github.com/nodejs/node-addon-api/commit/9e955a802b)] - **doc**: change node.js to Node.js per guideline (#579) (Tobias Nießen) [#579](https://github.com/nodejs/node-addon-api/pull/579)
46
+ * [[`b42e21e3a9`](https://github.com/nodejs/node-addon-api/commit/b42e21e3a9)] - **build**: move node/6 to travis allowed failures and add node/13 (#573) (Gabriel Schulhof)
47
+ * [[`8d6132f609`](https://github.com/nodejs/node-addon-api/commit/8d6132f609)] - **doc**: improve AsyncWorker docs (#571) (legendecas) [#571](https://github.com/nodejs/node-addon-api/pull/571)
48
+ * [[`bc8fc23627`](https://github.com/nodejs/node-addon-api/commit/bc8fc23627)] - **test**: do not run TSFN tests on NAPI\_VERSION \< 4 (legendecas) [#576](https://github.com/nodejs/node-addon-api/pull/576)
49
+ * [[`bcc1d58fc4`](https://github.com/nodejs/node-addon-api/commit/bcc1d58fc4)] - implement Object::AddFinalizer (Gabriel Schulhof)
50
+ * [[`e9a4bcd52a`](https://github.com/nodejs/node-addon-api/commit/e9a4bcd52a)] - **doc**: updates Make.js doc to current best practices (Jim Schlight) [#558](https://github.com/nodejs/node-addon-api/pull/558)
51
+ * [[`b513d1aa7a`](https://github.com/nodejs/node-addon-api/commit/b513d1aa7a)] - **doc**: fix return type of ArrayBuffer::Data (Tobias Nießen) [#552](https://github.com/nodejs/node-addon-api/pull/552)
52
+ * [[`34c11cf0a4`](https://github.com/nodejs/node-addon-api/commit/34c11cf0a4)] - **src**: disallow copying, double close of scopes (legendecas) [#566](https://github.com/nodejs/node-addon-api/pull/566)
53
+ * [[`ce139a05e8`](https://github.com/nodejs/node-addon-api/commit/ce139a05e8)] - **src**: make failure of closing scopes fatal (legendecas) [#566](https://github.com/nodejs/node-addon-api/pull/566)
54
+ * [[`740c79823e`](https://github.com/nodejs/node-addon-api/commit/740c79823e)] - **src**: add Env() to AsyncContext (Rolf Timmermans) [#568](https://github.com/nodejs/node-addon-api/pull/568)
55
+ * [[`ea9ce1c801`](https://github.com/nodejs/node-addon-api/commit/ea9ce1c801)] - **tsfn**: add wrappers for Ref and Unref (Kevin Eady) [#561](https://github.com/nodejs/node-addon-api/pull/561)
56
+ * [[`2e1769e1a3`](https://github.com/nodejs/node-addon-api/commit/2e1769e1a3)] - **error**: remove unnecessary if condition (legendecas) [#562](https://github.com/nodejs/node-addon-api/pull/562)
57
+ * [[`828f223a87`](https://github.com/nodejs/node-addon-api/commit/828f223a87)] - **doc**: fix spelling in ObjectWrap doc (#563) (Tobias Nießen) [#563](https://github.com/nodejs/node-addon-api/pull/563)
58
+ * [[`dd9fa8a4a8`](https://github.com/nodejs/node-addon-api/commit/dd9fa8a4a8)] - **doc**: move Arunesh and Taylor to Emeritus (#540) (Michael Dawson) [#540](https://github.com/nodejs/node-addon-api/pull/540)
59
+ * [[`cf8b8415df`](https://github.com/nodejs/node-addon-api/commit/cf8b8415df)] - **doc**: add Kevin to the list of collaborators (#539) (Michael Dawson) [#539](https://github.com/nodejs/node-addon-api/pull/539)
60
+ * [[`5d6aeae7b5`](https://github.com/nodejs/node-addon-api/commit/5d6aeae7b5)] - **build**: enable travis for fast PR check (legendecas)
61
+ * [[`6192e705cd`](https://github.com/nodejs/node-addon-api/commit/6192e705cd)] - **src**: add napi\_date (Mathias Küsel) [#497](https://github.com/nodejs/node-addon-api/pull/497)
62
+ * [[`7b1ee96d52`](https://github.com/nodejs/node-addon-api/commit/7b1ee96d52)] - **doc**: update prebuild\_tools.md (Nurbol Alpysbayev) [#527](https://github.com/nodejs/node-addon-api/pull/527)
63
+ * [[`0b4f3a5b8c`](https://github.com/nodejs/node-addon-api/commit/0b4f3a5b8c)] - **tsfn**: fix crash on releasing tsfn (legendecas) [#532](https://github.com/nodejs/node-addon-api/pull/532)
64
+ * [[`c3c8814d2f`](https://github.com/nodejs/node-addon-api/commit/c3c8814d2f)] - implement virutal ObjectWrap::Finalize (Michael Price) [#515](https://github.com/nodejs/node-addon-api/pull/515)
65
+
66
+ ## 2019-07-23 Version 1.7.1, @NickNaso
67
+
68
+ ### Notable changes:
69
+
70
+ #### API
71
+
72
+ - Fixed compilation problems that happen on Node.js with N-API version less than 4.
73
+
74
+ ### Commmits
75
+
76
+ * [[`c20bcbd069`](https://github.com/nodejs/node-addon-api/commit/c20bcbd069)] - Merge pull request #518 from NickNaso/master (Nicola Del Gobbo)
77
+ * [[`6720d57253`](https://github.com/nodejs/node-addon-api/commit/6720d57253)] - Create the native threadsafe\_function for test only for N-API greater than 3. (NickNaso)
78
+ * [[`37b6c185ad`](https://github.com/nodejs/node-addon-api/commit/37b6c185ad)] - Fix compilation breakage on 1.7.0 (NickNaso)
79
+
80
+ ## 2019-07-23 Version 1.7.0, @NickNaso
81
+
82
+ ### Notable changes:
83
+
84
+ #### API
85
+
86
+ - Added `Napi::ThreadSafeFunction` api.
87
+ - Added `Napi::AsyncWorker::GetResult()` method to `Napi::AsyncWorker`.
88
+ - Added `Napi::AsyncWorker::Destroy()()` method to `Napi::AsyncWorker`.
89
+ - Use full namespace on macros that create the errors.
90
+
91
+ #### Documentation
92
+
93
+ - Added documentation about contribution philosophy.
94
+ - Added documentation for `Napi::ThreadSafeFunction`.
95
+ - Some minor corrections all over the documentation.
96
+
97
+ #### TEST
98
+
99
+ - Added test case for bool operator.
100
+ - Fixed test case for `Napi::ObjectWrap`.
101
+
102
+ ### Commmits
103
+
104
+ * [[`717c9ab163`](https://github.com/nodejs/node-addon-api/commit/717c9ab163)] - **AsyncWorker**: add GetResult() method (Kevin Eady) [#512](https://github.com/nodejs/node-addon-api/pull/512)
105
+ * [[`d9d991bbc9`](https://github.com/nodejs/node-addon-api/commit/d9d991bbc9)] - **doc**: add ThreadSafeFunction to main README (#513) (Kevin Eady) [#513](https://github.com/nodejs/node-addon-api/pull/513)
106
+ * [[`ac6000d0fd`](https://github.com/nodejs/node-addon-api/commit/ac6000d0fd)] - **doc**: fix minor typo (Yohei Kishimoto) [#510](https://github.com/nodejs/node-addon-api/pull/510)
107
+ * [[`e9fa1eaa86`](https://github.com/nodejs/node-addon-api/commit/e9fa1eaa86)] - **doc**: document ThreadSafeFunction (#494) (Kevin Eady) [#494](https://github.com/nodejs/node-addon-api/pull/494)
108
+ * [[`cab3b1e2a2`](https://github.com/nodejs/node-addon-api/commit/cab3b1e2a2)] - **doc**: ClassPropertyDescriptor example (Ross Weir) [#507](https://github.com/nodejs/node-addon-api/pull/507)
109
+ * [[`c32d7dbdcf`](https://github.com/nodejs/node-addon-api/commit/c32d7dbdcf)] - **macros**: create errors fully namespaced (Gabriel Schulhof) [#506](https://github.com/nodejs/node-addon-api/pull/506)
110
+ * [[`0a90df2fcb`](https://github.com/nodejs/node-addon-api/commit/0a90df2fcb)] - Implement ThreadSafeFunction class (Jinho Bang)
111
+ * [[`1fb540eeb5`](https://github.com/nodejs/node-addon-api/commit/1fb540eeb5)] - Use curly brackets to include node\_api.h (NickNaso) [#493](https://github.com/nodejs/node-addon-api/pull/493)
112
+ * [[`b2b08122ea`](https://github.com/nodejs/node-addon-api/commit/b2b08122ea)] - **AsyncWorker**: make callback optional (Kevin Eady) [#489](https://github.com/nodejs/node-addon-api/pull/489)
113
+ * [[`a0cac77c82`](https://github.com/nodejs/node-addon-api/commit/a0cac77c82)] - Added test for bool operator (NickNaso) [#490](https://github.com/nodejs/node-addon-api/pull/490)
114
+ * [[`ab7d8fcc48`](https://github.com/nodejs/node-addon-api/commit/ab7d8fcc48)] - **src**: fix objectwrap test case (Michael Dawson) [#495](https://github.com/nodejs/node-addon-api/pull/495)
115
+ * [[`3b6b9eb88a`](https://github.com/nodejs/node-addon-api/commit/3b6b9eb88a)] - **AsyncWorker**: introduce Destroy() method (Gabriel Schulhof) [#488](https://github.com/nodejs/node-addon-api/pull/488)
116
+ * [[`f633fbd95d`](https://github.com/nodejs/node-addon-api/commit/f633fbd95d)] - string.md: Document existing New(env, value, length) APIs (Tux3) [#486](https://github.com/nodejs/node-addon-api/pull/486)
117
+ * [[`aaea55eda9`](https://github.com/nodejs/node-addon-api/commit/aaea55eda9)] - Little fix on code example (Nicola Del Gobbo) [#470](https://github.com/nodejs/node-addon-api/pull/470)
118
+ * [[`e1cf9a35a1`](https://github.com/nodejs/node-addon-api/commit/e1cf9a35a1)] - Use `Value::IsEmpty` to check for empty value (NickNaso) [#478](https://github.com/nodejs/node-addon-api/pull/478)
119
+ * [[`3ad5dfc7d9`](https://github.com/nodejs/node-addon-api/commit/3ad5dfc7d9)] - Fix link (Alba Mendez) [#481](https://github.com/nodejs/node-addon-api/pull/481)
120
+ * [[`a3b4d99c45`](https://github.com/nodejs/node-addon-api/commit/a3b4d99c45)] - **doc**: Add contribution philosophy doc (Hitesh Kanwathirtha)
121
+ * [[`36863f087b`](https://github.com/nodejs/node-addon-api/commit/36863f087b)] - **doc**: refer to TypedArray and ArrayBuffer from Array (Gabriel "_|Nix|_" Schulhof) [#465](https://github.com/nodejs/node-addon-api/pull/465)
122
+
3
123
  ## 2019-04-03 Version 1.6.3, @NickNaso
4
124
 
5
125
  ### Notable changes:
@@ -14,7 +134,7 @@
14
134
 
15
135
  #### Documentation
16
136
 
17
- - Some minor corrections all over the documentation
137
+ - Some minor corrections all over the documentation.
18
138
 
19
139
  ### Commmits
20
140
 
@@ -0,0 +1,66 @@
1
+ # **node-addon-api** Contribution Philosophy
2
+
3
+ The **node-addon-api** team loves contributions. There are many ways in which you can
4
+ contribute to **node-addon-api**:
5
+ - Source code fixes
6
+ - Additional tests
7
+ - Documentation improvements
8
+ - Joining the N-API working group and participating in meetings
9
+
10
+ ## Source changes
11
+
12
+ **node-addon-api** is meant to be a thin convenience wrapper around N-API. With this
13
+ in mind, contributions of any new APIs that wrap around a core N-API API will
14
+ be considered for merge. However, changes that wrap existing **node-addon-api**
15
+ APIs are encouraged to instead be provided as an ecosystem module. The
16
+ **node-addon-api** team is happy to link to a curated set of modules that build on
17
+ top of **node-addon-api** if they have broad usefulness to the community and promote
18
+ a recommended idiom or pattern.
19
+
20
+ ### Rationale
21
+
22
+ The N-API team considered a couple different approaches with regards to changes
23
+ extending **node-addon-api**
24
+ - Larger core module - Incorporate these helpers and patterns into **node-addon-api**
25
+ - Extras package - Create a new package (strawman name '**node-addon-api**-extras')
26
+ that contain utility classes and methods that help promote good patterns and
27
+ idioms while writing native addons with **node-addon-api**.
28
+ - Ecosystem - Encourage creation of a module ecosystem around **node-addon-api**
29
+ where folks can build on top of it.
30
+
31
+ #### Larger Core
32
+ This is probably our simplest option in terms of immediate action needed. It
33
+ would involve landing any open PRs against **node-addon-api**, and continuing to
34
+ encourage folks to make PRs for utility helpers against the same repository.
35
+
36
+ The downside of the approach is the following:
37
+ - Less coherency for our API set
38
+ - More maintenance burden on the N-API WG core team.
39
+
40
+ #### Extras Package
41
+ This involves us spinning up a new package which contains the utility classes
42
+ and methods. This has the benefit of having a separate module where helpers
43
+ which make it easier to implement certain patterns and idioms for native addons
44
+ easier.
45
+
46
+ The downside of this approach is the following:
47
+ - Potential for confusion - we'll need to provide clear documentation to help the
48
+ community understand where a particular contribution should be directed to (what
49
+ belongs in **node-addon-api** vs **node-addon-api-extras**)
50
+ - Need to define the level of support/API guarantees
51
+ - Unclear if the maintenance burden on the N-API WG is reduced or not
52
+
53
+ #### Ecosystem
54
+ This doesn't require a ton of up-front work from the N-API WG. Instead of
55
+ accepting utility PRs into **node-addon-api** or creating and maintaining a new
56
+ module, the WG will encourage the creation of an ecosystem of modules that
57
+ build on top of **node-addon-api**, and provide some level of advertising for these
58
+ modules (listing them out on the repository/wiki, using them in workshops/tutorials
59
+ etc).
60
+
61
+ The downside of this approach is the following:
62
+ - Potential for lack of visibility - evangelism and education is hard, and module
63
+ authors might not find right patterns and instead implement things themselves
64
+ - There might be greater friction for the N-API WG in evolving APIs since the
65
+ ecosystem would have taken dependencies on the API shape of **node-addon-api**
66
+
package/README.md CHANGED
@@ -46,7 +46,7 @@ to ideas specified in the **ECMA262 Language Specification**.
46
46
  - **[Contributors](#contributors)**
47
47
  - **[License](#license)**
48
48
 
49
- ## **Current version: 1.6.3**
49
+ ## **Current version: 2.0.0**
50
50
 
51
51
  (See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
52
52
 
@@ -75,6 +75,7 @@ The following is the documentation for node-addon-api.
75
75
  - [String](doc/string.md)
76
76
  - [Name](doc/basic_types.md#name)
77
77
  - [Number](doc/number.md)
78
+ - [Date](doc/date.md)
78
79
  - [BigInt](doc/bigint.md)
79
80
  - [Boolean](doc/boolean.md)
80
81
  - [Env](doc/env.md)
@@ -106,6 +107,8 @@ The following is the documentation for node-addon-api.
106
107
  - [Async Operations](doc/async_operations.md)
107
108
  - [AsyncWorker](doc/async_worker.md)
108
109
  - [AsyncContext](doc/async_context.md)
110
+ - [AsyncProgressWorker](doc/async_progress_worker.md)
111
+ - [Thread-safe Functions](doc/threadsafe_function.md)
109
112
  - [Promises](doc/promises.md)
110
113
  - [Version management](doc/version_management.md)
111
114
 
@@ -159,6 +162,11 @@ Take a look and get inspired by our **[test suite](https://github.com/nodejs/nod
159
162
 
160
163
  <a name="resources"></a>
161
164
 
165
+ ## **Contributing**
166
+
167
+ We love contributions from the community to **node-addon-api**.
168
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around extending this module.
169
+
162
170
  ### **More resource and info about native Addons**
163
171
  - **[C++ Addons](https://nodejs.org/dist/latest/docs/api/addons.html)**
164
172
  - **[N-API](https://nodejs.org/dist/latest/docs/api/n-api.html)**
@@ -172,20 +180,21 @@ Take a look and get inspired by our **[test suite](https://github.com/nodejs/nod
172
180
  | Name | GitHub Link |
173
181
  | ------------------- | ----------------------------------------------------- |
174
182
  | Anna Henningsen | [addaleax](https://github.com/addaleax) |
175
- | Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) |
176
183
  | Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
177
184
  | Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
178
185
  | Jim Schlight | [jschlight](https://github.com/jschlight) |
179
186
  | Michael Dawson | [mhdawson](https://github.com/mhdawson) |
187
+ | Kevin Eady | [KevinEady](https://github.com/KevinEady)
180
188
  | Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
181
- | Taylor Woll | [boingoing](https://github.com/boingoing) |
182
189
 
183
190
  ### Emeritus
184
191
  | Name | GitHub Link |
185
192
  | ------------------- | ----------------------------------------------------- |
193
+ | Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) |
186
194
  | Benjamin Byholm | [kkoopa](https://github.com/kkoopa) |
187
195
  | Jason Ginchereau | [jasongin](https://github.com/jasongin) |
188
196
  | Sampson Gao | [sampsongao](https://github.com/sampsongao) |
197
+ | Taylor Woll | [boingoing](https://github.com/boingoing) |
189
198
 
190
199
  <a name="license"></a>
191
200
 
@@ -123,7 +123,7 @@ Returns the length of the wrapped data, in bytes.
123
123
  ### Data
124
124
 
125
125
  ```cpp
126
- T* Napi::ArrayBuffer::Data() const;
126
+ void* Napi::ArrayBuffer::Data() const;
127
127
  ```
128
128
 
129
129
  Returns a pointer the wrapped data.
@@ -45,6 +45,16 @@ The `Napi::AsyncContext` to be destroyed.
45
45
  virtual Napi::AsyncContext::~AsyncContext();
46
46
  ```
47
47
 
48
+ ### Env
49
+
50
+ Requests the environment in which the async context has been initially created.
51
+
52
+ ```cpp
53
+ Napi::Env Env() const;
54
+ ```
55
+
56
+ Returns the `Napi::Env` environment in which the async context has been created.
57
+
48
58
  ## Operator
49
59
 
50
60
  ```cpp
@@ -4,7 +4,7 @@ Node.js native add-ons often need to execute long running tasks and to avoid
4
4
  blocking the **event loop** they have to run them asynchronously from the
5
5
  **event loop**.
6
6
  In the Node.js model of execution the event loop thread represents the thread
7
- where JavaScript code is executing. The node.js guidance is to avoid blocking
7
+ where JavaScript code is executing. The Node.js guidance is to avoid blocking
8
8
  other work queued on the event loop thread. Therefore, we need to do this work on
9
9
  another thread.
10
10