function set( size ) {
	/* eslint-disable no-invalid-this */
	var FLG = isNull( size );
	if ( !isPositiveInteger( size ) && !FLG ) {
		throw new TypeError( format( 'invalid assignment. `%s` must be a positive integer or null. Value: `%s`.', 'bufferSize', size ) );
	}
	if ( FLG ) {
		size = FLOAT64_MAX;
	}
	if ( this._data && size < this._data.length ) {
		throw new RangeError( format( 'invalid assignment. `%s` size is less than the number of data elements. Number of elements: `%u`. Value: `%u`.', 'bufferSize', this._data.length, size ) );
	}
	if ( size !== this._bufferSize ) {
		debug( 'Current value: %s.', this._bufferSize );

		this._bufferSize = size;
		debug( 'New value: %s.', this._bufferSize );

		this.emit( 'change' );
	}
}
Sets the data buffer size.

@param {(PositiveInteger|null)} size - data buffer size
@throws {TypeError} must be a positive integer or null
@throws {RangeError} must be greater than or equal to the number of data elements