A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/is-buffer below:

is-buffer - npm

is-buffer Determine if an object is a Buffer (including the browserify Buffer)

Why not use Buffer.isBuffer?

This module lets you check if an object is a Buffer without using Buffer.isBuffer (which includes the whole buffer module in browserify).

It's future-proof and works in node too!

install usage

var isBuffer = require('is-buffer')

 

isBuffer(new Buffer(4)) 

isBuffer(Buffer.alloc(4)) 

 

isBuffer(undefined) 

isBuffer(null) 

isBuffer('') 

isBuffer(true) 

isBuffer(false) 

isBuffer(0) 

isBuffer(1) 

isBuffer(1.0) 

isBuffer('string') 

isBuffer({}) 

isBuffer(function foo () {}) 

license

MIT. Copyright (C) Feross Aboukhadijeh.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4