diff options
author | eric thul <thul.eric@gmail.com> | 2015-04-08 19:49:24 -0400 |
---|---|---|
committer | eric thul <thul.eric@gmail.com> | 2015-04-12 11:19:22 -0400 |
commit | c194f84cab66fa6e18b78c32f9cdf2bddf8d1e68 (patch) | |
tree | 5470b97ffc561915796f5a8a2a9541d9ebef50ae /src/LoaderUtil.purs | |
parent | 9d38968bbe4bbf54e2ca836d9a1550d74d4da703 (diff) | |
download | purs-loader-c194f84cab66fa6e18b78c32f9cdf2bddf8d1e68.tar.gz purs-loader-c194f84cab66fa6e18b78c32f9cdf2bddf8d1e68.tar.zst purs-loader-c194f84cab66fa6e18b78c32f9cdf2bddf8d1e68.zip |
Rewrite using purescript for the implementation
Diffstat (limited to 'src/LoaderUtil.purs')
-rw-r--r-- | src/LoaderUtil.purs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/LoaderUtil.purs b/src/LoaderUtil.purs new file mode 100644 index 0000000..f22be44 --- /dev/null +++ b/src/LoaderUtil.purs | |||
@@ -0,0 +1,20 @@ | |||
1 | module PursLoader.LoaderUtil | ||
2 | ( getRemainingRequest | ||
3 | , parseQuery | ||
4 | ) where | ||
5 | |||
6 | import Data.Foreign (Foreign()) | ||
7 | |||
8 | import PursLoader.LoaderRef (LoaderRef()) | ||
9 | |||
10 | foreign import getRemainingRequest """ | ||
11 | function getRemainingRequest(ref){ | ||
12 | var loaderUtils = require('loader-utils'); | ||
13 | return loaderUtils.getRemainingRequest(ref); | ||
14 | }""" :: LoaderRef -> String | ||
15 | |||
16 | foreign import parseQuery """ | ||
17 | function parseQuery(query){ | ||
18 | var loaderUtils = require('loader-utils'); | ||
19 | return loaderUtils.parseQuery(query); | ||
20 | }""" :: String -> Foreign | ||