src/index.js
function _getWishIndexById(id) {
  let wishIndex = -1
  if (_isArray(id)) {
    const wishIndexes = []
    _each(id, wishId => {
      wishIndexes.push(_getWishIndexById(wishId))
    })
    return wishIndexes
  } else {
    _each(_wishes, (aWish, index) => {
      if (aWish.id === id) {
        wishIndex = index
        return false
      }
    })
    return wishIndex
  }
}
function _getWishIndexById(id) {
  let wishIndex = -1
  if (_isArray(id)) {
    const wishIndexes = []
    _each(id, wishId => {
      wishIndexes.push(_getWishIndexById(wishId))
    })
    return wishIndexes
  } else {
    _each(_wishes, (aWish, index) => {
      if (aWish.id === id) {
        wishIndex = index
        return false
      }
    })
    return wishIndex
  }
}
function _getWishIndexById ( id ) { let wishIndex = - 1 if ( _isArray ( id ) ) { const wishIndexes = [ ] _each ( id , wishId => { wishIndexes . push ( _getWishIndexById ( wishId ) ) } ) return wishIndexes } else { _each ( _wishes , ( aWish , index ) => { if ( aWish . id === id ) { wishIndex = index return false } } ) return wishIndex } }
Gets a wish from the _wishes array by its ID
@param {wishIds} id
@returns {wish|Array.<wish>}
@private
Gets a wish from the _wishes array by its ID