function BooleanArray() {
	var byteOffset;
	var nargs;
	var buf;
	var len;
	var arg;

	nargs = arguments.length;
	if ( !(this instanceof BooleanArray) ) {
		if ( nargs === 0 ) {
			return new BooleanArray();
		}
		if ( nargs === 1 ) {
			return new BooleanArray( arguments[0] );
		}
		if ( nargs === 2 ) {
			return new BooleanArray( arguments[0], arguments[1] );
		}
		return new BooleanArray( arguments[0], arguments[1], arguments[2] );
	}
	// Create the underlying data buffer...
	if ( nargs === 0 ) {
		buf = new Uint8Array( 0 ); // backward-compatibility
	} else if ( nargs === 1 ) {
		arg = arguments[ 0 ];
		if ( isNonNegativeInteger( arg ) ) {
			buf = new Uint8Array( arg );
		} else if ( isCollection( arg ) ) {
			buf = fromArray( new Uint8Array( arg.length ), arg );
		} else if ( isArrayBuffer( arg ) ) {
			buf = new Uint8Array( arg );
		} else if ( isObject( arg ) ) {
			if ( HAS_ITERATOR_SYMBOL === false ) {
				throw new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', arg ) );
			}
			if ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {
				throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
			}
			buf = arg[ ITERATOR_SYMBOL ]();
			if ( !isFunction( buf.next ) ) {
				throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
			}
			buf = new Uint8Array( fromIterator( buf ) );
		} else {
			throw new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );
		}
	} else {
		buf = arguments[ 0 ];
		if ( !isArrayBuffer( buf ) ) {
			throw new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );
		}
		byteOffset = arguments[ 1 ];
		if ( !isNonNegativeInteger( byteOffset ) ) {
			throw new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );
		}
		if ( nargs === 2 ) {
			buf = new Uint8Array( buf, byteOffset );
		} else {
			len = arguments[ 2 ];
			if ( !isNonNegativeInteger( len ) ) {
				throw new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );
			}
			if ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {
				throw new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );
			}
			buf = new Uint8Array( buf, byteOffset, len );
		}
	}
	setReadOnly( this, '_buffer', buf );
	setReadOnly( this, '_length', buf.length );

	return this;
}
Boolean array constructor.

@constructor
@param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable
@param {NonNegativeInteger} [byteOffset=0] - byte offset
@param {NonNegativeInteger} [length] - view length
@throws {TypeError} if provided only a single argument, must provide a valid argument
@throws {TypeError} byte offset must be a nonnegative integer
@throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements
@returns {BooleanArray} boolean array

@example
var arr = new BooleanArray();
// returns <BooleanArray>

var len = arr.length;
// returns 0

@example
var arr = new BooleanArray( 2 );
// returns <BooleanArray>

var len = arr.length;
// returns 2

@example
var arr = new BooleanArray( [ true, false ] );
// returns <BooleanArray>

var len = arr.length;
// returns 2

@example
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 16 );
var arr = new BooleanArray( buf );
// returns <BooleanArray>

var len = arr.length;
// returns 16

@example
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 16 );
var arr = new BooleanArray( buf, 8 );
// returns <BooleanArray>

var len = arr.length;
// returns 8

@example
var ArrayBuffer = require( '@stdlib/array/buffer' );

var buf = new ArrayBuffer( 32 );
var arr = new BooleanArray( buf, 8, 2 );
// returns <BooleanArray>

var len = arr.length;
// returns 2