<commit_before>'use strict'

//----------------------------------------------------------
// Modules
//----------------------------------------------------------
// NPM
const chalk     = require('chalk')
const logUpdate = require('log-update')
const os        = require('os')
const Writable  = require('stream').Writable
const kindOf    = require('kind-of')

// Local
const errs = require('lib/errs').index
const createSpinner = require('lib/createSpinner')
const validOpts     = require('lib/validOpts')
const states        = require('lib/states')
const defaultProps  = require('lib/defaultProps')

//----------------------------------------------------------
// Logic
//----------------------------------------------------------
module.exports = class Multispinner {

  //----------------------------------------------------------
  // Constructor
  //----------------------------------------------------------
  /**
   * @constructor
   * @desc Constructs Spinner class with spinners and options.
   * @param {Object} spinners - Spinners to create
   * @param {Object} opts - Configurable options
   */
  constructor(spinners, opts) {
    // throw if spinners param is not an array or object
    const spinnersType = kindOf(spinners)
    if (spinnersType !== 'object' && spinnersType !== 'array') {
      errs.spinnersType()
    }

    // throw if opts param is not an object
    const optsType = kindOf(opts)
    if (optsType !== 'object') errs.optsType()

    // assign default props
    Object.keys(defaultProps).map(prop => {
      this[prop] = defaultProps[prop]
    })
<commit_msg>fix incorrect err thrown if optional constructor opts param is undefined<commit_after>'use strict'

//----------------------------------------------------------
// Modules
//----------------------------------------------------------
// NPM
const chalk     = require('chalk')
const logUpdate = require('log-update')
const os        = require('os')
const Writable  = require('stream').Writable
const kindOf    = require('kind-of')

// Local
const errs = require('lib/errs').index
const createSpinner = require('lib/createSpinner')
const validOpts     = require('lib/validOpts')
const states        = require('lib/states')
const defaultProps  = require('lib/defaultProps')

//----------------------------------------------------------
// Logic
//----------------------------------------------------------
module.exports = class Multispinner {

  //----------------------------------------------------------
  // Constructor
  //----------------------------------------------------------
  /**
   * @constructor
   * @desc Constructs Spinner class with spinners and options.
   * @param {Object} spinners - Spinners to create
   * @param {Object} opts - Configurable options
   */
  constructor(spinners, opts) {
    // throw if spinners param is not an array or object
    const spinnersType = kindOf(spinners)
    if (spinnersType !== 'object' && spinnersType !== 'array') {
      errs.spinnersType()
    }

    // throw if opts param is not an object
    const optsType = kindOf(opts)
    if (opts && optsType !== 'object') errs.optsType()

    // assign default props
    Object.keys(defaultProps).map(prop => {
      this[prop] = defaultProps[prop]
    })

{'fraction_non_alphanumeric': 0.3190637511549122, 'fraction_numerical': 0.0, 'mean_word_length': 1.4587433762301287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7399489', 'n_tokens_mistral': 781, 'n_tokens_neox': 774, 'n_words': 215}