]>
git.immae.eu Git - github/fretlink/purs-loader.git/blob - src/PursLoader/LoaderRef.js
3 // module PursLoader.LoaderRef
5 function asyncFn(isJust
, fromMaybe
, ref
){
7 var callback
= ref
.async();
8 return function(error
){
9 return function(value
){
11 return isJust(error
) ? callback(fromMaybe(new Error())(error
))
12 : callback(null, value
);
18 function cacheable(ref
){
20 return ref
.cacheable
&& ref
.cacheable();
28 function clearDependencies(ref
){
30 return ref
.clearDependencies();
34 function resourcePath(ref
){
35 return ref
.resourcePath
;
38 function addDependency(ref
){
41 return ref
.addDependency(dep
);
46 exports
.asyncFn
= asyncFn
;
48 exports
.cacheable
= cacheable
;
50 exports
.query
= query
;
52 exports
.clearDependencies
= clearDependencies
;
54 exports
.resourcePath
= resourcePath
;
56 exports
.addDependency
= addDependency
;