Skip to documentation

package

@stackline/is-buffer 1.0.2 — installation and API

Determine if an object is a Buffer

Install @stackline/is-buffer

npm install @stackline/[email protected]

Package version: 1.0.2. Metadata verified: 2026-11-12. This is separate from the framework version and demonstration runtime.

Node.js requirement
{"node": ">=4"}
Accepted peer dependencies (declared ranges)
{}

Tested environments are described in the versioned README and linked source checks. A declared peer range is not evidence that every version in it was tested.

Versioned reference

This reference comes from the published @stackline/[email protected] README. Its upstream attribution and license remain with the source. Benchmark and security statements describe the cited tests and advisories, not a guarantee for every application.

@stackline/is-buffer

Determine if an object is a Buffer.

Documentation | npm | Issues | Repository

Current package version: 1.0.2


Why this package?

@stackline/is-buffer is the Stackline-maintained distribution of [email protected]. It is an independent continuation of is-buffer; original authors and licenses remain credited below.

Compatibility

Item Value
Package @stackline/[email protected]
API target [email protected]
Supported Node.js >=4
License MIT
Main entry index.js
Runtime dependencies none

Installation

npm install @stackline/is-buffer

Preserve existing imports and plugin resolution with an npm alias:

npm install is-buffer@npm:@stackline/is-buffer

Usage and API reference

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

npm install @stackline/is-buffer

usage

var isBuffer = require('@stackline/is-buffer')

isBuffer(new Buffer(4)) // true
isBuffer(Buffer.alloc(4)) //true

isBuffer(undefined) // false
isBuffer(null) // false
isBuffer('') // false
isBuffer(true) // false
isBuffer(false) // false
isBuffer(0) // false
isBuffer(1) // false
isBuffer(1.0) // false
isBuffer('string') // false
isBuffer({}) // false
isBuffer(function foo () {}) // false

license

MIT. Copyright (C) Feross Aboukhadijeh.

Credits and original authors

Original copyright, license notices and contributor acknowledgements remain part of this distribution. Stackline maintenance does not replace authorship of the original work.

License

MIT. See the license and notice files in the repository.

Use this repository's issue tracker for reproducible bugs and feature requests. Join r/Stackline for examples, usage questions and release discussions.