diff options
Diffstat (limited to 'src/PursLoader/LoaderRef.js')
-rw-r--r-- | src/PursLoader/LoaderRef.js | 50 |
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 | |||
5 | function 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 | } | ||
18 | function cacheable(ref){ | ||
19 | return function(){ | ||
20 | return ref.cacheable && ref.cacheable(); | ||
21 | }; | ||
22 | } | ||
23 | |||
24 | function clearDependencies(ref){ | ||
25 | return function(){ | ||
26 | return ref.clearDependencies(); | ||
27 | }; | ||
28 | } | ||
29 | |||
30 | function resourcePath(ref){ | ||
31 | return ref.resourcePath; | ||
32 | } | ||
33 | |||
34 | function addDependency(ref){ | ||
35 | return function(dep){ | ||
36 | return function(){ | ||
37 | return ref.addDependency(dep); | ||
38 | }; | ||
39 | }; | ||
40 | } | ||
41 | |||
42 | exports.asyncFn = asyncFn; | ||
43 | |||
44 | exports.cacheable = cacheable; | ||
45 | |||
46 | exports.clearDependencies = clearDependencies; | ||
47 | |||
48 | exports.resourcePath = resourcePath; | ||
49 | |||
50 | exports.addDependency = addDependency; | ||