Files
lodash/_getNative.js
John-David Dalton ddf9328c67 Bump to v4.6.0.
2016-03-01 19:18:30 -08:00

17 lines
421 B
JavaScript

var isNative = require('./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;
}
module.exports = getNative;