UNPKG
fet-block
Version:
latest (1.1.2)
1.1.2
1.1.1
1.1.0
1.0.0
fetBlock is a web h5 request hook library
github.com/webjohnjiang/fet-block
webjohnjiang/fet-block
fet-block
/
src
/
tools
/
lang.js
14 lines
(12 loc)
•
302 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 技巧:自杀式函数状态记录。
let
getPrototypeOf =
function
(
obj
) {
if
(
Object
.
setPrototypeOf
) { getPrototypeOf =
Object
.
getPrototypeOf
; }
else
{ getPrototypeOf =
function
(
obj
) {
return
obj.
__proto__
; } }
return
getPrototypeOf
(obj); }
export
{ getPrototypeOf }