UNPKG

883 BMarkdownView Raw
1# TODO
2
3* ~~flatten~~
4* filter
5* add a ctor to make constructor work under compose
6* update fp.map to remove since second arguments
7* add flip on function to reverse the arguments (first two)
8* research safeGet
9* add `uniqueBy`
10* add `head` and `tail` and add capitialize
11```
12var safeGet = curry((propName, dft, obj) => {
13 var v;
14 if (obj != null) {
15 return (v = prop(propName, obj)) != null ? v : dft;
16 }
17 return dft;
18});
19
20// with the purpose to replace
21if (v && v.length > 100) {
22 // something
23} else {
24 // something else
25}
26```
27var fields = ['timeStampAsDate', 'bidObserverClientId', 'type', 'userId', 'trackingServer', 'entryPoint'];
28//var classNameMap = {
29// userId: 'col-md-4',
30// type: 'col-md-1',
31// bidObserverClientId: 'col-md-1',
32// entryPoint: 'col-md-1'
33//};
34//var getClassName = v => compose(map(defaultTo('col-md-2')), ap(classNameMap), map(prop))(v);
35```
36
\No newline at end of file