1 var global = require('./_global')
2 , hide = require('./_hide')
3 , has = require('./_has')
4 , SRC = require('./_uid')('src')
5 , TO_STRING = 'toString'
6 , $toString = Function[TO_STRING]
7 , TPL = ('' + $toString).split(TO_STRING);
9 require('./_core').inspectSource = function(it){
10 return $toString.call(it);
13 (module.exports = function(O, key, val, safe){
14 var isFunction = typeof val == 'function';
15 if(isFunction)has(val, 'name') || hide(val, 'name', key);
16 if(O[key] === val)return;
17 if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
25 if(O[key])O[key] = val;
26 else hide(O, key, val);
29 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
30 })(Function.prototype, TO_STRING, function toString(){
31 return typeof this == 'function' && this[SRC] || $toString.call(this);