src/core.js
function getNextVal(searchVal, mapping) {
  let value
  if (isMap(mapping)) {
    for (let [key, val] of mapping.entries()) {
      if (deepEqual(key, searchVal)) {
        value = val
        break
      }
    }
  } else {
    value = (mapping.find(keyVal => deepEqual(keyVal[0], searchVal)) || [])[1]
  }

  if (typeof value === 'function') {
    return value()
  }
  return value
}
function getNextVal(searchVal, mapping) {
  let value
  if (isMap(mapping)) {
    for (let [key, val] of mapping.entries()) {
      if (deepEqual(key, searchVal)) {
        value = val
        break
      }
    }
  } else {
    value = (mapping.find(keyVal => deepEqual(keyVal[0], searchVal)) || [])[1]
  }

  if (typeof value === 'function') {
    return value()
  }
  return value
}
function getNextVal ( searchVal , mapping ) { let value if ( isMap ( mapping ) ) { for ( let [ key , val ] of mapping . entries ( ) ) { if ( deepEqual ( key , searchVal ) ) { value = val break } } } else { value = ( mapping . find ( keyVal => deepEqual ( keyVal [ 0 ] , searchVal ) ) || [ ] ) [ 1 ] } if ( typeof value === 'function' ) { return value ( ) } return value }
Returns value in mapping corresponding to matching searchVal key.
Returns value in mapping corresponding to matching searchVal key .