getFnAndObjValue.js 247 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 import { isFunction, isObject } from './getType' export function getFnAndObjValue (target, key) { return isFunction(target) ? target(key) : !isObject(target) ? key : target[key] != null ? target[key] : key }