<commit_before>'use strict';

// MODULES //

var debug = require( 'debug' )( 'rug:main' );
var EventEmitter = require( 'events' ).EventEmitter;
var getKeys = require( 'object-keys' ).shim();
var linear = require( 'd3-scale' ).scaleLinear; // TODO: remove
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var copy = require( '@stdlib/utils/copy' );
var merge = require( '@stdlib/utils/merge' );
var isObject = require( '@stdlib/assert/is-plain-object' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var inherit = require( '@stdlib/utils/inherit' );
var isDefined = require( './accessors/is_defined.js' );
var defaults = require( './defaults.json' );


// VARIABLES //

var PRIVATE_PROPS = [
	'_autoRender',
	'_color',
	'_data',
	'_isDefined',
	'_label',
	'_opacity',
	'_orientation',
	'_scale',
	'_size'
];


// MAIN //

/**
* Rug constructor.
*
* @constructor
* @param {Options} [options] - constructor options
* @param {boolean} [options.autoRender=true] - indicates whether to re-render on a change event
* @param {(string|Function)} [options.color] - color
* @param {ArrayLike} [options.data=[]] - data
* @param {Function} [options.isDefined] - predicate function indicating whether a datum is defined
* @param {(string|Function)} [options.label] - label
* @param {(number|Function)} [options.opacity=0.9] - opacity
* @param {string} [options.orientation] - orientation
* @param {Function} [options.scale] - scale function
* @param {NonNegativeInteger} [options.size=6] - tick (tassel) size
* @throws {TypeError} options argument must be an object<commit_msg>Add default<commit_after>'use strict';

// MODULES //

var debug = require( 'debug' )( 'rug:main' );
var EventEmitter = require( 'events' ).EventEmitter;
var getKeys = require( 'object-keys' ).shim();
var linear = require( 'd3-scale' ).scaleLinear; // TODO: remove
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var copy = require( '@stdlib/utils/copy' );
var merge = require( '@stdlib/utils/merge' );
var isObject = require( '@stdlib/assert/is-plain-object' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var inherit = require( '@stdlib/utils/inherit' );
var isDefined = require( './accessors/is_defined.js' );
var defaults = require( './defaults.json' );


// VARIABLES //

var PRIVATE_PROPS = [
	'_autoRender',
	'_color',
	'_data',
	'_isDefined',
	'_label',
	'_opacity',
	'_orientation',
	'_scale',
	'_size'
];


// MAIN //

/**
* Rug constructor.
*
* @constructor
* @param {Options} [options] - constructor options
* @param {boolean} [options.autoRender=true] - indicates whether to re-render on a change event
* @param {(string|Function)} [options.color="#aaa"] - color
* @param {ArrayLike} [options.data=[]] - data
* @param {Function} [options.isDefined] - predicate function indicating whether a datum is defined
* @param {(string|Function)} [options.label] - label
* @param {(number|Function)} [options.opacity=0.9] - opacity
* @param {string} [options.orientation] - orientation
* @param {Function} [options.scale] - scale function
* @param {NonNegativeInteger} [options.size=6] - tick (tassel) size
* @throws {TypeError} options argument must be an object
{'fraction_non_alphanumeric': 0.17358726194192944, 'fraction_numerical': 0.002497658445207618, 'mean_word_length': 4.7214285714285715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3107176', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1015, 'n_words': 278}