is-audio-buffer

Check whether an object is instance of AudioBuffer

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
is-audio-buffer
211.1.05 years ago7 years agoMinified + gzip package size for is-audio-buffer in KB

Readme

is-audio-buffer Build Status Greenkeeper badge stable
Check whether an object is instance of AudioBuffer.

Usage

npm install is-audio-buffer ```js var isAudioBuffer = require('is-audio-buffer'); var ctx = require('audio-context'); var AudioBuffer = require('audio-buffer'); isAudioBuffer(ctx.createBuffer(2, 100, 44100)); //true isAudioBuffer(new AudioBuffer(1, 0, 1, 0)); //true isAudioBuffer(new Float32Array(1, 2, 3)); //false isAudioBuffer(); //false ``` Because there is too many implementations of AudioBuffer (1, 2, 3, 4) to rely on a instanceof AudioBuffer.