| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c1695c6 commit 2a53401
32 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -542,9 +542,7 @@ Save the file and close the editor. When prompted, enter a new commit message | |||
| 542 | 542 | for that commit. This is an opportunity to fix commit messages. | |
| 543 | 543 | ||
| 544 | 544 | * The commit message text must conform to the [commit message guidelines][]. | |
| 545 | - | ||
| 546 | - <a name="metadata"></a> | ||
| 547 | - * Change the original commit message to include metadata. (The | ||
| 545 | + * <a name="metadata"></a>Change the original commit message to include metadata. (The | ||
| 548 | 546 | [`git node metadata`][git-node-metadata] command can generate the metadata | |
| 549 | 547 | for you.) | |
| 550 | 548 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,6 +36,7 @@ features and idioms, as well as have some specific guidelines for the use of | |||
| 36 | 36 | runtime features. | |
| 37 | 37 | ||
| 38 | 38 | Coding guidelines are based on the following guides (highest priority first): | |
| 39 | + | ||
| 39 | 40 | 1. This document | |
| 40 | 41 | 2. The [Google C++ Style Guide][] | |
| 41 | 42 | 3. The ISO [C++ Core Guidelines][] | |
@@ -284,6 +285,7 @@ data[0] = 12345; | |||
| 284 | 285 | [Run Time Type Information][] | |
| 285 | 286 | ||
| 286 | 287 | Further reading: | |
| 288 | + | ||
| 287 | 289 | * [ES.48]: Avoid casts | |
| 288 | 290 | * [ES.49]: If you must use a cast, use a named cast | |
| 289 | 291 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,6 +56,7 @@ | |||
| 56 | 56 | <!--lint disable prohibited-strings remark-lint--> | |
| 57 | 57 | * NOT OK: Javascript, Google's v8 | |
| 58 | 58 | <!-- lint enable prohibited-strings remark-lint--> | |
| 59 | + | ||
| 59 | 60 | * Use _Node.js_ and not _Node_, _NodeJS_, or similar variants. | |
| 60 | 61 | * When referring to the executable, _`node`_ is acceptable. | |
| 61 | 62 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,6 +143,7 @@ followed by a function body. | |||
| 143 | 143 | ||
| 144 | 144 | The following three variables may be used inside the function body following an | |
| 145 | 145 | invocation of `NODE_MODULE_INIT()`: | |
| 146 | + | ||
| 146 | 147 | * `Local<Object> exports`, | |
| 147 | 148 | * `Local<Value> module`, and | |
| 148 | 149 | * `Local<Context> context` | |
@@ -158,6 +159,7 @@ they were created. | |||
| 158 | 159 | ||
| 159 | 160 | The context-aware addon can be structured to avoid global static data by | |
| 160 | 161 | performing the following steps: | |
| 162 | + | ||
| 161 | 163 | * defining a class which will hold per-addon-instance data. Such | |
| 162 | 164 | a class should include a `v8::Persistent<v8::Object>` which will hold a weak | |
| 163 | 165 | reference to the addon's `exports` object. The callback associated with the weak | |
@@ -259,6 +261,7 @@ signature. | |||
| 259 | 261 | ||
| 260 | 262 | In order to be loaded from multiple Node.js environments, | |
| 261 | 263 | such as a main thread and a Worker thread, an add-on needs to either: | |
| 264 | + | ||
| 262 | 265 | - Be an N-API addon, or | |
| 263 | 266 | - Be declared as context-aware using `NODE_MODULE_INIT()` as described above | |
| 264 | 267 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,6 +19,7 @@ will be instances of the `AssertionError` class. | |||
| 19 | 19 | <!-- YAML | |
| 20 | 20 | added: v0.1.21 | |
| 21 | 21 | --> | |
| 22 | + | ||
| 22 | 23 | * `options` {Object} | |
| 23 | 24 | * `message` {string} If provided, the error message is set to this value. | |
| 24 | 25 | * `actual` {any} The `actual` property on the error instance. | |
@@ -145,6 +146,7 @@ assert.deepEqual(/a/gi, new Date()); | |||
| 145 | 146 | <!-- YAML | |
| 146 | 147 | added: v0.5.9 | |
| 147 | 148 | --> | |
| 149 | + | ||
| 148 | 150 | * `value` {any} The input that is checked for being truthy. | |
| 149 | 151 | * `message` {string|Error} | |
| 150 | 152 | ||
@@ -174,6 +176,7 @@ changes: | |||
| 174 | 176 | pr-url: https://github.com/nodejs/node/pull/5910 | |
| 175 | 177 | description: Handle non-`Uint8Array` typed arrays correctly. | |
| 176 | 178 | --> | |
| 179 | + | ||
| 177 | 180 | * `actual` {any} | |
| 178 | 181 | * `expected` {any} | |
| 179 | 182 | * `message` {string|Error} | |
@@ -291,6 +294,7 @@ changes: | |||
| 291 | 294 | pr-url: https://github.com/nodejs/node/pull/5910 | |
| 292 | 295 | description: Handle non-`Uint8Array` typed arrays correctly. | |
| 293 | 296 | --> | |
| 297 | + | ||
| 294 | 298 | * `actual` {any} | |
| 295 | 299 | * `expected` {any} | |
| 296 | 300 | * `message` {string|Error} | |
@@ -420,6 +424,7 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the | |||
| 420 | 424 | <!-- YAML | |
| 421 | 425 | added: v10.0.0 | |
| 422 | 426 | --> | |
| 427 | + | ||
| 423 | 428 | * `asyncFn` {Function|Promise} | |
| 424 | 429 | * `error` {RegExp|Function} | |
| 425 | 430 | * `message` {string} | |
@@ -476,6 +481,7 @@ changes: | |||
| 476 | 481 | pr-url: https://github.com/nodejs/node/pull/3276 | |
| 477 | 482 | description: The `error` parameter can now be an arrow function. | |
| 478 | 483 | --> | |
| 484 | + | ||
| 479 | 485 | * `fn` {Function} | |
| 480 | 486 | * `error` {RegExp|Function} | |
| 481 | 487 | * `message` {string} | |
@@ -544,6 +550,7 @@ assert.doesNotThrow( | |||
| 544 | 550 | <!-- YAML | |
| 545 | 551 | added: v0.1.21 | |
| 546 | 552 | --> | |
| 553 | + | ||
| 547 | 554 | * `actual` {any} | |
| 548 | 555 | * `expected` {any} | |
| 549 | 556 | * `message` {string|Error} | |
@@ -583,6 +590,7 @@ parameter is an instance of an [`Error`][] then it will be thrown instead of the | |||
| 583 | 590 | <!-- YAML | |
| 584 | 591 | added: v0.1.21 | |
| 585 | 592 | --> | |
| 593 | + | ||
| 586 | 594 | * `message` {string|Error} **Default:** `'Failed'` | |
| 587 | 595 | ||
| 588 | 596 | Throws an `AssertionError` with the provided error message or a default error | |
@@ -614,6 +622,7 @@ changes: | |||
| 614 | 622 | description: Calling `assert.fail()` with more than one argument is | |
| 615 | 623 | deprecated and emits a warning. | |
| 616 | 624 | --> | |
| 625 | + | ||
| 617 | 626 | * `actual` {any} | |
| 618 | 627 | * `expected` {any} | |
| 619 | 628 | * `message` {string|Error} | |
@@ -680,6 +689,7 @@ changes: | |||
| 680 | 689 | description: Value may now only be `undefined` or `null`. Before all falsy | |
| 681 | 690 | values were handled the same as `null` and did not throw. | |
| 682 | 691 | --> | |
| 692 | + | ||
| 683 | 693 | * `value` {any} | |
| 684 | 694 | ||
| 685 | 695 | Throws `value` if `value` is not `undefined` or `null`. This is useful when | |
@@ -733,6 +743,7 @@ changes: | |||
| 733 | 743 | pr-url: https://github.com/nodejs/node/pull/5910 | |
| 734 | 744 | description: Handle non-`Uint8Array` typed arrays correctly. | |
| 735 | 745 | --> | |
| 746 | + | ||
| 736 | 747 | * `actual` {any} | |
| 737 | 748 | * `expected` {any} | |
| 738 | 749 | * `message` {string|Error} | |
@@ -814,6 +825,7 @@ changes: | |||
| 814 | 825 | pr-url: https://github.com/nodejs/node/pull/5910 | |
| 815 | 826 | description: Handle non-`Uint8Array` typed arrays correctly. | |
| 816 | 827 | --> | |
| 828 | + | ||
| 817 | 829 | * `actual` {any} | |
| 818 | 830 | * `expected` {any} | |
| 819 | 831 | * `message` {string|Error} | |
@@ -837,6 +849,7 @@ instead of the `AssertionError`. | |||
| 837 | 849 | <!-- YAML | |
| 838 | 850 | added: v0.1.21 | |
| 839 | 851 | --> | |
| 852 | + | ||
| 840 | 853 | * `actual` {any} | |
| 841 | 854 | * `expected` {any} | |
| 842 | 855 | * `message` {string|Error} | |
@@ -879,6 +892,7 @@ changes: | |||
| 879 | 892 | pr-url: https://github.com/nodejs/node/pull/17003 | |
| 880 | 893 | description: Used comparison changed from Strict Equality to `Object.is()` | |
| 881 | 894 | --> | |
| 895 | + | ||
| 882 | 896 | * `actual` {any} | |
| 883 | 897 | * `expected` {any} | |
| 884 | 898 | * `message` {string|Error} | |
@@ -916,6 +930,7 @@ changes: | |||
| 916 | 930 | description: The `assert.ok()` (no arguments) will now use a predefined | |
| 917 | 931 | error message. | |
| 918 | 932 | --> | |
| 933 | + | ||
| 919 | 934 | * `value` {any} | |
| 920 | 935 | * `message` {string|Error} | |
| 921 | 936 | ||
@@ -978,6 +993,7 @@ assert(0); | |||
| 978 | 993 | <!-- YAML | |
| 979 | 994 | added: v10.0.0 | |
| 980 | 995 | --> | |
| 996 | + | ||
| 981 | 997 | * `asyncFn` {Function|Promise} | |
| 982 | 998 | * `error` {RegExp|Function|Object|Error} | |
| 983 | 999 | * `message` {string} | |
@@ -1040,6 +1056,7 @@ changes: | |||
| 1040 | 1056 | pr-url: https://github.com/nodejs/node/pull/17003 | |
| 1041 | 1057 | description: Used comparison changed from Strict Equality to `Object.is()` | |
| 1042 | 1058 | --> | |
| 1059 | + | ||
| 1043 | 1060 | * `actual` {any} | |
| 1044 | 1061 | * `expected` {any} | |
| 1045 | 1062 | * `message` {string|Error} | |
@@ -1096,6 +1113,7 @@ changes: | |||
| 1096 | 1113 | pr-url: https://github.com/nodejs/node/pull/3276 | |
| 1097 | 1114 | description: The `error` parameter can now be an arrow function. | |
| 1098 | 1115 | --> | |
| 1116 | + | ||
| 1099 | 1117 | * `fn` {Function} | |
| 1100 | 1118 | * `error` {RegExp|Function|Object|Error} | |
| 1101 | 1119 | * `message` {string} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,6 +138,7 @@ changes: | |||
| 138 | 138 | description: The implementation is now spec compliant and does not throw | |
| 139 | 139 | anymore. | |
| 140 | 140 | --> | |
| 141 | + | ||
| 141 | 142 | * `value` {any} The value tested for being truthy. | |
| 142 | 143 | * `...message` {any} All arguments besides `value` are used as error message. | |
| 143 | 144 | ||
@@ -233,6 +234,7 @@ changes: | |||
| 233 | 234 | pr-url: https://github.com/nodejs/node/pull/17033 | |
| 234 | 235 | description: "`console.debug` is now an alias for `console.log`." | |
| 235 | 236 | --> | |
| 237 | + | ||
| 236 | 238 | * `data` {any} | |
| 237 | 239 | * `...args` {any} | |
| 238 | 240 | ||
@@ -242,6 +244,7 @@ The `console.debug()` function is an alias for [`console.log()`][]. | |||
| 242 | 244 | <!-- YAML | |
| 243 | 245 | added: v0.1.101 | |
| 244 | 246 | --> | |
| 247 | + | ||
| 245 | 248 | * `obj` {any} | |
| 246 | 249 | * `options` {Object} | |
| 247 | 250 | * `showHidden` {boolean} If `true` then the object's non-enumerable and symbol | |
@@ -264,6 +267,7 @@ changes: | |||
| 264 | 267 | pr-url: https://github.com/nodejs/node/pull/17152 | |
| 265 | 268 | description: "`console.dirxml` now calls `console.log` for its arguments." | |
| 266 | 269 | --> | |
| 270 | + | ||
| 267 | 271 | * `...data` {any} | |
| 268 | 272 | ||
| 269 | 273 | This method calls `console.log()` passing it the arguments received. | |
@@ -273,6 +277,7 @@ This method does not produce any XML formatting. | |||
| 273 | 277 | <!-- YAML | |
| 274 | 278 | added: v0.1.100 | |
| 275 | 279 | --> | |
| 280 | + | ||
| 276 | 281 | * `data` {any} | |
| 277 | 282 | * `...args` {any} | |
| 278 | 283 | ||
@@ -323,6 +328,7 @@ Decreases indentation of subsequent lines by two spaces. | |||
| 323 | 328 | <!-- YAML | |
| 324 | 329 | added: v0.1.100 | |
| 325 | 330 | --> | |
| 331 | + | ||
| 326 | 332 | * `data` {any} | |
| 327 | 333 | * `...args` {any} | |
| 328 | 334 | ||
@@ -332,6 +338,7 @@ The `console.info()` function is an alias for [`console.log()`][]. | |||
| 332 | 338 | <!-- YAML | |
| 333 | 339 | added: v0.1.100 | |
| 334 | 340 | --> | |
| 341 | + | ||
| 335 | 342 | * `data` {any} | |
| 336 | 343 | * `...args` {any} | |
| 337 | 344 | ||
@@ -391,6 +398,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); | |||
| 391 | 398 | <!-- YAML | |
| 392 | 399 | added: v0.1.104 | |
| 393 | 400 | --> | |
| 401 | + | ||
| 394 | 402 | * `label` {string} **Default:** `'default'` | |
| 395 | 403 | ||
| 396 | 404 | Starts a timer that can be used to compute the duration of an operation. Timers | |
@@ -407,6 +415,7 @@ changes: | |||
| 407 | 415 | description: This method no longer supports multiple calls that don’t map | |
| 408 | 416 | to individual `console.time()` calls; see below for details. | |
| 409 | 417 | --> | |
| 418 | + | ||
| 410 | 419 | * `label` {string} **Default:** `'default'` | |
| 411 | 420 | ||
| 412 | 421 | Stops a timer that was previously started by calling [`console.time()`][] and | |
@@ -423,6 +432,7 @@ console.timeEnd('100-elements'); | |||
| 423 | 432 | <!-- YAML | |
| 424 | 433 | added: v10.7.0 | |
| 425 | 434 | --> | |
| 435 | + | ||
| 426 | 436 | * `label` {string} **Default:** `'default'` | |
| 427 | 437 | * `...data` {any} | |
| 428 | 438 | ||
@@ -442,6 +452,7 @@ console.timeEnd('process'); | |||
| 442 | 452 | <!-- YAML | |
| 443 | 453 | added: v0.1.104 | |
| 444 | 454 | --> | |
| 455 | + | ||
| 445 | 456 | * `message` {any} | |
| 446 | 457 | * `...args` {any} | |
| 447 | 458 | ||
@@ -468,6 +479,7 @@ console.trace('Show me'); | |||
| 468 | 479 | <!-- YAML | |
| 469 | 480 | added: v0.1.100 | |
| 470 | 481 | --> | |
| 482 | + | ||
| 471 | 483 | * `data` {any} | |
| 472 | 484 | * `...args` {any} | |
| 473 | 485 | ||
@@ -482,6 +494,7 @@ not display anything unless used in conjunction with the [inspector][] | |||
| 482 | 494 | <!-- YAML | |
| 483 | 495 | added: v8.0.0 | |
| 484 | 496 | --> | |
| 497 | + | ||
| 485 | 498 | * `label` {string} **Default:** `'default'` | |
| 486 | 499 | ||
| 487 | 500 | This method does not display anything unless used in the inspector. The | |
@@ -492,6 +505,7 @@ This method does not display anything unless used in the inspector. The | |||
| 492 | 505 | <!-- YAML | |
| 493 | 506 | added: v8.0.0 | |
| 494 | 507 | --> | |
| 508 | + | ||
| 495 | 509 | * `label` {string} | |
| 496 | 510 | ||
| 497 | 511 | This method does not display anything unless used in the inspector. The | |
@@ -510,6 +524,7 @@ console.profileEnd('MyLabel'); | |||
| 510 | 524 | <!-- YAML | |
| 511 | 525 | added: v8.0.0 | |
| 512 | 526 | --> | |
| 527 | + | ||
| 513 | 528 | * `label` {string} | |
| 514 | 529 | ||
| 515 | 530 | This method does not display anything unless used in the inspector. Stops the | |
@@ -524,6 +539,7 @@ stopped. | |||
| 524 | 539 | <!-- YAML | |
| 525 | 540 | added: v8.0.0 | |
| 526 | 541 | --> | |
| 542 | + | ||
| 527 | 543 | * `label` {string} | |
| 528 | 544 | ||
| 529 | 545 | This method does not display anything unless used in the inspector. The | |
@@ -534,6 +550,7 @@ This method does not display anything unless used in the inspector. The | |||
| 534 | 550 | <!-- YAML | |
| 535 | 551 | added: v8.0.0 | |
| 536 | 552 | --> | |
| 553 | + | ||
| 537 | 554 | * `label` {string} **Default:** `'default'` | |
| 538 | 555 | ||
| 539 | 556 | This method does not display anything unless used in the inspector. The | |
@@ -543,6 +560,7 @@ This method does not display anything unless used in the inspector. The | |||
| 543 | 560 | <!-- YAML | |
| 544 | 561 | added: v8.0.0 | |
| 545 | 562 | --> | |
| 563 | + | ||
| 546 | 564 | * `label` {string} **Default:** `'default'` | |
| 547 | 565 | ||
| 548 | 566 | This method does not display anything unless used in the inspector. The | |
| Back | FazBrowse Home | New Git URL |
0 commit comments