mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-05 11:31:31 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
29 lines
851 B
JavaScript
29 lines
851 B
JavaScript
import _curry3 from './internal/_curry3.js';
|
|
|
|
/**
|
|
* Takes a predicate, a transformation function, and an initial value,
|
|
* and returns a value of the same type as the initial value.
|
|
* It does so by applying the transformation until the predicate is satisfied,
|
|
* at which point it returns the satisfactory value.
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.20.0
|
|
* @category Logic
|
|
* @sig (a -> Boolean) -> (a -> a) -> a -> a
|
|
* @param {Function} pred A predicate function
|
|
* @param {Function} fn The iterator function
|
|
* @param {*} init Initial value
|
|
* @return {*} Final value that satisfies predicate
|
|
* @example
|
|
*
|
|
* R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128
|
|
*/
|
|
var until = /*#__PURE__*/_curry3(function until(pred, fn, init) {
|
|
var val = init;
|
|
while (!pred(val)) {
|
|
val = fn(val);
|
|
}
|
|
return val;
|
|
});
|
|
export default until; |