UNPKG
drag-helper
Version:
latest (1.3.6)
1.3.6
1.3.5
1.3.3
1.3.2
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.1
1.1.0
1.0.0
A drag & drop utility
github.com/radubrehar/DragHelper
radubrehar/DragHelper
drag-helper
/
utils
/
once.js
17 lines
(12 loc)
•
257 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use once'
module
.
exports
=
function
once
(
fn, scope
){
var
called
var
result
return
function
(
){
if
(called){
return
result } called =
true
return
result = fn.
apply
(scope ||
this
,
arguments
) } }