-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.js
1 lines (1 loc) · 934 Bytes
/
index.js
1
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).curry=t()}(this,(function(){"use strict";function n(n,t){return function(...e){if(0===e.length)return;let r=e.shift(),u=1;for(;u<t&&e.length>0;u++)r=n(r,e.shift(),u);return u<t?function e(r,u){return function(...f){let i=r;if(0===f.length)return i;for(;u<t&&f.length>0;u++)i=n(i,f.shift(),u);return u<t?e(i,u):i}}(r,u):r}}return{op:function(t,e=1/0,r=!1){return r?function(n,t){return function e(...r){return r.length<t?function(...t){return 0!==t.length?e(...r,...t):r.reduce(n)}:r.reduce(n)}}(t,e):n(t,e)},fixed:function(n){const t=this;return function e(...r){return r.length<n.length?function(...n){return e(...r,...n)}:n.call(t,...r)}},deCurry:function(n){return function(...t){let e=n;for(let n=0;n<t.length;n++){e=e(t[n])}return e}}}}));