UNPKG
rc-hooks
Version:
latest (3.2.0)
3.2.0
3.1.2
3.1.1
3.1.0
3.0.25
3.0.24
3.0.23
3.0.22
3.0.21
3.0.20
3.0.19
3.0.18
3.0.17
3.0.16
3.0.15
3.0.14
3.0.13
3.0.12
3.0.11
3.0.10
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.3.2
2.3.1
2.3.0
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.0
1.6.2
1.6.1
1.6.0
1.5.0
1.4.2
1.4.1
1.4.0
1.3.0
1.2.1
1.2.0
1.1.1
1.1.0
1.0.1
1.0.0
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.1
0.7.0
0.6.6
0.6.5
0.6.4
0.6.3
0.6.1
0.6.0
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0
0.3.0
0.0.0
React Hooks Library.
github.com/doly-dev/hooks
doly-dev/rc-hooks
rc-hooks
/
es
/
utils
/
getRef.js
14 lines
(13 loc)
•
273 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function
getRef
(
ref
)
{
if
(
typeof
ref
===
'function'
) {
// @ts-ignore
return
ref
(); }
else
if
(
typeof
ref
===
'object'
&&
ref
&&
'current'
in
ref
) {
return
ref
.current; }
else
{
return
ref
; } } export
default
getRef;