From 63af1ab60f7290ae462e0a6f9647ba181244f085 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 8 Jan 2020 07:11:58 +0100 Subject: [PATCH] doc: update description of `External` The previous description did not mention what an `External` is and instead only provided some hints around what it is not. Update the description to be more accurate. PR-URL: https://github.com/nodejs/node/pull/31255 Reviewed-By: Anto Aravinth Reviewed-By: Ruben Bridgewater Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/api/util.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index d1671cac00efa5..f592468d4889a2 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1391,11 +1391,12 @@ added: v10.0.0 * Returns: {boolean} Returns `true` if the value is a native `External` value. -A native `External` value is a special type of object whose -data is not stored within the JavaScript managed heap -and does not conform to standard JavaScript types. Such -objects are created either by Node.js internals or native -addons and are wrapped by a JavaScript object. + +A native `External` value is a special type of object that contains a +raw C++ pointer (`void*`) for access from native code, and has no other +properties. Such objects are created either by Node.js internals or native +addons. In JavaScript, they are [frozen][`Object.freeze()`] objects with a +`null` prototype. ### `util.types.isFloat32Array(value)`