forked from nodejscn/node-api-cn
-
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.
- Loading branch information
Showing
1,085 changed files
with
9,805 additions
and
2,324 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# node-api-cn | ||
Node.js API 中文文档 v6.10.3 | ||
Node.js API 中文文档 v8.0.0 | ||
|
||
http://nodejs.cn/api/ |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
> Stability: 1 - Experimental | ||
|
||
N-API is an API for building native Addons. It is independent from | ||
the underlying JavaScript runtime (ex V8) and is maintained as part of | ||
Node.js itself. This API will be Application Binary Interface (ABI) stable | ||
across version of Node.js. It is intended to insulate Addons from | ||
changes in the underlying JavaScript engine and allow modules | ||
compiled for one version to run on later versions of Node.js without | ||
recompilation. Addons are built/packaged with the same approach/tools | ||
outlined in this document (node-gyp, etc.). The only difference is the | ||
set of APIs that are used by the native code. Instead of using the V8 | ||
or [Native Abstractions for Node.js][] APIs, the functions available | ||
in the N-API are used. | ||
|
||
The functions available and how to use them are documented in the | ||
section titled [C/C++ Addons - N-API](n-api.html). | ||
|
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
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
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
Empty file.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
For the following cases, consider using ES2015 [`Object.is()`][], | ||
which uses the [SameValueZero][] comparison. | ||
|
||
```js | ||
const a = 0; | ||
const b = -a; | ||
assert.notStrictEqual(a, b); | ||
// AssertionError: 0 !== -0 | ||
// Strict Equality Comparison doesn't distinguish between -0 and +0... | ||
assert(!Object.is(a, b)); | ||
// but Object.is() does! | ||
const str1 = 'foo'; | ||
const str2 = 'foo'; | ||
assert.strictEqual(str1 / 1, str2 / 1); | ||
// AssertionError: NaN === NaN | ||
// Strict Equality Comparison can't be used to check NaN... | ||
assert(Object.is(str1 / 1, str2 / 1)); | ||
// but Object.is() can! | ||
``` | ||
|
||
For more information, see | ||
[MDN's guide on equality comparisons and sameness][mdn-equality-guide]. | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
The `buffer` property references the underlying `ArrayBuffer` object based on | ||
which this Buffer object is created. | ||
|
||
```js | ||
const arrayBuffer = new ArrayBuffer(16); | ||
const buffer = Buffer.from(arrayBuffer); | ||
console.log(buffer.buffer === arrayBuffer); | ||
// Prints: true | ||
``` | ||
|
19 changes: 13 additions & 6 deletions
19
buffer/buf_compare_target_targetstart_targetend_sourcestart_sourceend.md
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
Oops, something went wrong.