Files
lodash/_getNative.js
John-David Dalton 7da4c55415 Bump to v4.6.0.
2016-02-29 23:41:02 -08:00

17 lines
416 B
JavaScript

import isNative from './isNative';
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = object[key];
return isNative(value) ? value : undefined;
}
export default getNative;