src/index.js
function _createWish(wish) {
  const id = wish.id || `g-${_previousId++}`
  const newWish = {
    id,
    context: _createContext(wish.context),
    data: wish.data || {},
    magicWords: _arrayify(wish.magicWords),
    action: _createAction(wish.action),
  }
  newWish.data.timesMade = {
    total: 0,
    magicWords: {},
  }
  return newWish
}
function _createWish(wish) {
  const id = wish.id || `g-${_previousId++}`
  const newWish = {
    id,
    context: _createContext(wish.context),
    data: wish.data || {},
    magicWords: _arrayify(wish.magicWords),
    action: _createAction(wish.action),
  }
  newWish.data.timesMade = {
    total: 0,
    magicWords: {},
  }
  return newWish
}
function _createWish ( wish ) { const id = wish . id || ` ${ _previousId ++ } ` const newWish = { id , context : _createContext ( wish . context ) , data : wish . data || { } , magicWords : _arrayify ( wish . magicWords ) , action : _createAction ( wish . action ) , } newWish . data . timesMade = { total : 0 , magicWords : { } , } return newWish }
Creates a new wish object.
@param {object} wish
@returns {wish} New wish object
@private
Creates a new wish object .