UNPKG
@curi/helpers
Version:
latest (2.0.2)
next (2.0.0-beta.4)
2.0.2
2.0.1
2.0.0
2.0.0-beta.4
2.0.0-beta.3
2.0.0-beta.2
2.0.0-beta.1
2.0.0-beta.0
2.0.0-alpha.5
2.0.0-alpha.4
2.0.0-alpha.3
2.0.0-alpha.2
2.0.0-alpha.1
2.0.0-alpha.0
1.0.0
Functions that can be useful in Curi apps
pshrmn/curi
@curi/helpers
/
dist
/
curi-helpers.es.js
17 lines
(14 loc)
•
348 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function
once
(fn)
{ var promise;
return
function
() {
if
(promise !== undefined) {
return
promise; } promise = fn.
apply
(null, arguments);
return
promise; }; }
function
preferDefault
(
module
)
{
return
module
.
default
?
module
.
default
:
module
; }
export
{ once, preferDefault };