mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: fix util.isBuffer examples
util.isPrimitive was used in place of util.isBuffer. PR-URL: https://github.com/iojs/io.js/pull/496 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
committed by
Ben Noordhuis
parent
3abfb56f9b
commit
6f36630f55
@@ -389,11 +389,11 @@ Returns `true` if the given "object" is a `Buffer`. `false` otherwise.
|
||||
|
||||
var util = require('util');
|
||||
|
||||
util.isPrimitive({ length: 0 })
|
||||
util.isBuffer({ length: 0 })
|
||||
// false
|
||||
util.isPrimitive([])
|
||||
util.isBuffer([])
|
||||
// false
|
||||
util.isPrimitive(new Buffer('hello world'))
|
||||
util.isBuffer(new Buffer('hello world'))
|
||||
// true
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user