We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c97325 commit 2b21a31Copy full SHA for 2b21a31
doc/api/buffer.md
@@ -743,6 +743,14 @@ added: v0.1.101
743
744
Returns `true` if `obj` is a `Buffer`, `false` otherwise.
745
746
+```js
747
+Buffer.isBuffer(Buffer.alloc(10)); // true
748
+Buffer.isBuffer(Buffer.from('foo')); // true
749
+Buffer.isBuffer('a string'); // false
750
+Buffer.isBuffer([]); // false
751
+Buffer.isBuffer(new Uint8Array(1024)); // false
752
+```
753
+
754
### Static method: `Buffer.isEncoding(encoding)`
755
<!-- YAML
756
added: v0.9.1
0 commit comments