aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PursLoader/LoaderRef.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/PursLoader/LoaderRef.js')
-rw-r--r--src/PursLoader/LoaderRef.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/PursLoader/LoaderRef.js b/src/PursLoader/LoaderRef.js
deleted file mode 100644
index a5d8e1f..0000000
--- a/src/PursLoader/LoaderRef.js
+++ /dev/null
@@ -1,50 +0,0 @@
1'use strict';
2
3// module PursLoader.LoaderRef
4
5function asyncFn(isJust, fromMaybe, ref){
6 return function(){
7 var callback = ref.async();
8 return function(error){
9 return function(value){
10 return function(){
11 return isJust(error) ? callback(fromMaybe(new Error())(error))
12 : callback(null, value);
13 };
14 };
15 };
16 };
17}
18function cacheable(ref){
19 return function(){
20 return ref.cacheable && ref.cacheable();
21 };
22}
23
24function clearDependencies(ref){
25 return function(){
26 return ref.clearDependencies();
27 };
28}
29
30function resourcePath(ref){
31 return ref.resourcePath;
32}
33
34function addDependency(ref){
35 return function(dep){
36 return function(){
37 return ref.addDependency(dep);
38 };
39 };
40}
41
42exports.asyncFn = asyncFn;
43
44exports.cacheable = cacheable;
45
46exports.clearDependencies = clearDependencies;
47
48exports.resourcePath = resourcePath;
49
50exports.addDependency = addDependency;