Skip to content

Commit b6ea62e

Browse files
authored
beautify ✨
1 parent e22527d commit b6ea62e

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

dist/composable-normalize.js

+29-13
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,47 @@
1-
(function (global, factory) {
1+
(function(global, factory) {
22
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3-
typeof define === 'function' && define.amd ? define('composableNormalize', factory) :
4-
(global.composableNormalize = factory());
5-
}(this, function () { 'use strict';
3+
typeof define === 'function' && define.amd ? define('composableNormalize', factory) :
4+
(global.composableNormalize = factory());
5+
}(this, function() {
6+
'use strict';
67

78
// decode :: String -> String
89
var decode = decodeURIComponent;
910

1011
// _compose :: (b -> c) -> (a -> b) -> (a -> c)
11-
var _compose = function (f, g) { return function () {
12-
var args = [], len = arguments.length;
13-
while ( len-- ) args[ len ] = arguments[ len ];
12+
var _compose = function(f, g) {
13+
return function() {
14+
var args = [],
15+
len = arguments.length;
16+
while (len--) args[len] = arguments[len];
1417

15-
return f(g.apply(void 0, args));
16-
; } };
18+
return f(g.apply(void 0, args));;
19+
}
20+
};
1721

1822
// compose :: [(d -> e) -> (c -> d) -> (b -> c) -> (a -> b)] -> (a -> e)
19-
var compose = function (fns) { return fns.reduce(_compose); };
23+
var compose = function(fns) {
24+
return fns.reduce(_compose);
25+
};
2026

2127
// replace :: Regex -> String -> String -> String
22-
var replace = function (pattern, substr) { return function (str) { return str.replace(pattern, substr); }; };
28+
var replace = function(pattern, substr) {
29+
return function(str) {
30+
return str.replace(pattern, substr);
31+
};
32+
};
2333

2434
// toLower :: String -> String
25-
var toLower = function (str) { return str.toLowerCase(); };
35+
var toLower = function(str) {
36+
return str.toLowerCase();
37+
};
2638

2739
// append :: String -> String -> String
28-
var append = function (a) { return function (b) { return b.concat(a); }; };
40+
var append = function(a) {
41+
return function(b) {
42+
return b.concat(a);
43+
};
44+
};
2945

3046
var dedupeSlashes = /([^:]\/)\/+/g;
3147
var dedupeDots = /\/\.+/g;

0 commit comments

Comments
 (0)