about summary refs log tree commit diff stats
path: root/js/b.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/b.min.js')
-rw-r--r--js/b.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/b.min.js b/js/b.min.js
new file mode 100644
index 0000000..1a5647b
--- /dev/null
+++ b/js/b.min.js
@@ -0,0 +1 @@
+'use strict';const b={pipe:(...args)=>args.reduce((acc,el)=>el(acc)),compose:(...fns)=>(...args)=>fns.reduceRight((res,fn)=>[fn.call(null,...res)],args)[0],identity:x=>x,curry:(fn)=>{const curried=(...args)=>{if(args.length>=fn.length){return fn(...args)}else{return(...rest)=>curried(...args,...rest)}}return curried},match:()=>b.curry((what,s)=>s.match(what)),replace:()=>b.curry((what,replacement,s)=>s.replace(what,replacement)),filter:()=>b.curry((f,xs)=>xs.filter(f)),map:()=>b.curry((f,xs)=>xs.map(f)),deepMap:()=>b.curry(function deepMap(f,xs){return Array.isArray(xs)?xs.map((x)=>deepMap(f,x)):f(xs)})};
\ No newline at end of file