UNPKG

minter-js-sdk

Version:
20 lines (16 loc) 508 B
'use strict'; var _baseIsNative = require('./_baseIsNative.js'); var _getValue = require('./_getValue.js'); /** * 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 = _getValue(object, key); return _baseIsNative(value) ? value : undefined; } module.exports = getNative;