mirror of
https://github.com/sbrow/strings.git
synced 2025-12-29 23:17:39 -05:00
fix: re-built code.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.when = exports.tail = exports.isEmpty = exports.curry = void 0;
|
||||
exports.until = exports.when = exports.tail = exports.isEmpty = exports.curry = void 0;
|
||||
exports.curry = function (fn) {
|
||||
return (...args) => {
|
||||
if (args.length >= fn.length) {
|
||||
@@ -17,3 +17,7 @@ exports.tail = tail;
|
||||
exports.when = (0, exports.curry)((predicate, whenTrueFn, arg) => {
|
||||
return predicate(arg) ? whenTrueFn(arg) : arg;
|
||||
});
|
||||
exports.until = (0, exports.curry)((predicate, fn, arg) => {
|
||||
const loop = (a) => predicate(a) ? a : loop(fn(a));
|
||||
return loop(arg);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user