GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: adding example to Buffer.isBuffer method · nodejs/node@6201f23

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • buffer.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,14 @@ added: v0.1.101
730730

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

733+
```js
734+
Buffer.isBuffer(Buffer.alloc(10)); // true
735+
Buffer.isBuffer(Buffer.from('foo')); // true
736+
Buffer.isBuffer('a string'); // false
737+
Buffer.isBuffer([]); // false
738+
Buffer.isBuffer(new Uint8Array(1024)); // false
739+
```
740+
733741
### Static method: `Buffer.isEncoding(encoding)`
734742
<!-- YAML
735743
added: v0.9.1

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.