Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,15 @@ added: v0.1.101

Returns `true` if `obj` is a `Buffer`, `false` otherwise.

```js

Comment thread
ntedgi marked this conversation as resolved.
Outdated
Buffer.isBuffer(Buffer.alloc(10)); // true
Buffer.isBuffer(Buffer.from('foo')); // true
Buffer.isBuffer('a string'); // false
Buffer.isBuffer([]); // false
Buffer.isBuffer(new Uint8Array(1024)); // false

Comment thread
ntedgi marked this conversation as resolved.
Outdated
```
### Static method: `Buffer.isEncoding(encoding)`
<!-- YAML
added: v0.9.1
Expand Down