| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1d78d50 commit 6201f23
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -730,6 +730,14 @@ added: v0.1.101 | |||
| 730 | 730 | ||
| 731 | 731 | Returns `true` if `obj` is a `Buffer`, `false` otherwise. | |
| 732 | 732 | ||
| 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 | + | ||
| 733 | 741 | ### Static method: `Buffer.isEncoding(encoding)` | |
| 734 | 742 | <!-- YAML | |
| 735 | 743 | added: v0.9.1 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments