function Sparkline() {
	var options;
	var nargs;
	var opts;
	var keys;
	var self;
	var key;
	var i;

	nargs = arguments.length;
	if ( !(this instanceof Sparkline) ) {
		if ( nargs === 0 ) {
			return new Sparkline();
		}
		if ( nargs === 1 ) {
			return new Sparkline( arguments[ 0 ] );
		}
		return new Sparkline( arguments[ 0 ], arguments[ 1 ] );
	}
	self = this;

	opts = defaults();
	if ( nargs === 0 ) {
		options = {};
	} else if ( nargs === 1 ) {
		if ( isCollection( arguments[ 0 ] ) ) {
			options = {
				'data': arguments[ 0 ]
			};
		} else {
			options = arguments[ 0 ];
			if ( !isObject( options ) ) {
				throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
			}
		}
	} else {
		if ( !isObject( arguments[ 1 ] ) ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', arguments[ 1 ] ) );
		}
		options = arguments[ 1 ];
		options.data = arguments[ 0 ];
	}
	opts = merge( opts, options );

	debug( 'Creating an instance with the following configuration: %s.', JSON.stringify( opts ) );
	EventEmitter.call( this );

	for ( i = 0; i < PRIVATE_PROPS.length; i++ ) {
		defineProperty( this, PRIVATE_PROPS[i], {
			'configurable': false,
			'enumerable': false,
			'writable': true,
			'value': null
		});
	}

	// Set options...
	keys = objectKeys( opts );
	for ( i = 0; i < keys.length; i++ ) {
		key = keys[ i ];
		this[ key ] = opts[ key ];
	}

	// Add event listeners:
	this.on( 'change', onChange );
	this.on( 'render', onRender );

	return this;

	/**
	* Callback invoked upon receiving a `change` event.
	*
	* @private
	*/
	function onChange() {
		/* eslint-disable no-underscore-dangle */
		debug( 'Received a change event.' );
		if ( self._autoRender ) {
			self.render();
		}
	}

	/**
	* Callback invoked upon receiving a `render` event.
	*
	* @private
	* @param {*} chart - rendered chart
	*/
	function onRender() {
		debug( 'Received a render event.' );
	}
}
Sparkline constructor.

@constructor
@param {(Collection|ndarrayLike)} [data] - sparkline data
@param {Options} [options] - sparkline options
@param {boolean} [options.autoRender=false] - indicates whether to re-render on a `change` event
@param {(PositiveInteger|null)} [options.bufferSize] - data buffer size
@param {(Collection|ndarrayLike)} [options.data] - data
@param {string} [options.description=''] - sparkline description
@param {Function} [options.isDefined] - accessor indicating whether a datum is defined
@param {string} [options.label] - data label
@throws {TypeError} must provide valid options
@returns {Sparkline} sparkline instance

@example
var data = [ 1.0, 5.0, 3.0, 2.0, 4.0, 4.0, 3.0 ];

var chart = Sparkline( data );

@example
var data = [ 1.0, 5.0, 3.0, 2.0, 4.0, 4.0, 3.0 ];
var opts = {
    'data': data
};
var chart = Sparkline( opts );