lib/columns.js
function Columns(props) {

  // require and bind methods
  //----------------------------------------------------------
  [ 'bindState'
  , 'solve'
  ].forEach(method =>
    this.constructor.prototype[method] = require(`./methods/${method}`)
  )

  // bind props (immutable) and state (mutable)
  //----------------------------------------------------------
  this.props = props
  this.bindState(1)

  // find solution state
  //----------------------------------------------------------
  this.solve()
}
function Columns(props) {

  // require and bind methods
  //----------------------------------------------------------
  [ 'bindState'
  , 'solve'
  ].forEach(method =>
    this.constructor.prototype[method] = require(`./methods/${method}`)
  )

  // bind props (immutable) and state (mutable)
  //----------------------------------------------------------
  this.props = props
  this.bindState(1)

  // find solution state
  //----------------------------------------------------------
  this.solve()
}
function Columns ( props ) { // require and bind methods //---------------------------------------------------------- [ 'bindState' , 'solve' ] . forEach ( method => this . constructor . prototype [ method ] = require ( ` ${ method } ` ) ) // bind props (immutable) and state (mutable) //---------------------------------------------------------- this . props = props this . bindState ( 1 ) // find solution state //---------------------------------------------------------- this . solve ( ) }
Constructor with columnization logic.

@param {Object} props - immutable properties that dictate columnization
@returns {Object} instance of self
Constructor with columnization logic .