UNPKG
lapras
Version:
latest (0.1.1)
0.1.1
0.1.0
A React library to create guided walkthroughs and tours
github.com/revanth47/lapras
revanth47/lapras
lapras
/
lib
/
utils.js
16 lines
(15 loc)
•
351 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
function
getTarget
(
t
) {
let
el =
null
;
if
(t) {
if
(
typeof
t ===
'string'
) { el =
document
.
querySelector
(t) || el; }
else
if
(t.
nodeType
===
1
) { el = t; } }
return
el; }
exports
.
getTarget
= getTarget;