src/converter.js
function convertToAnyRoll( object = {}) {
  const { again, success, fail } = object || {};

  if ( isAbsent( again ) && isAbsent( success ) && isAbsent( fail )) {
    return convertToRoll( object );
  } // else
  return convertToWodRoll( object );
}
function convertToAnyRoll( object = {}) {
  const { again, success, fail } = object || {};

  if ( isAbsent( again ) && isAbsent( success ) && isAbsent( fail )) {
    return convertToRoll( object );
  } // else
  return convertToWodRoll( object );
}
function convertToAnyRoll ( object = { } ) { const { again , success , fail } = object || { } ; if ( isAbsent ( again ) && isAbsent ( success ) && isAbsent ( fail ) ) { return convertToRoll ( object ) ; } // else return convertToWodRoll ( object ) ; }
Converts any arguments to `Roll` or `WodRoll` object.
If passed argument has `again`, `success` or `fail` property, the function will return `WodRoll`.
Otherwise, `Roll` will be returned.

@func
@alias convert
@since v2.1.0
@param {Object} object - `Roll`, `WodRoll` or similar object.
@return {Roll|WodRoll} Result of converion.
@example
convert({ dice: 6 }); //=> new Roll( 6 )
convert({ modifier: 6 }); //=> new Roll( undefined, undefined, 6 )
convert({ dice: 10, count: 5, success: 5 }); //=> new WodRoll( 10, 5, undefined, 5 )
Converts any arguments to Roll or WodRoll object . If passed argument has again success or fail property the function will return WodRoll . Otherwise Roll will be returned .