mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +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>
32 lines
867 B
JavaScript
32 lines
867 B
JavaScript
import _curry2 from './internal/_curry2.js';
|
|
import _isNumber from './internal/_isNumber.js';
|
|
|
|
/**
|
|
* Returns a list of numbers from `from` (inclusive) to `to` (exclusive).
|
|
*
|
|
* @func
|
|
* @memberOf R
|
|
* @since v0.1.0
|
|
* @category List
|
|
* @sig Number -> Number -> [Number]
|
|
* @param {Number} from The first number in the list.
|
|
* @param {Number} to One more than the last number in the list.
|
|
* @return {Array} The list of numbers in the set `[a, b)`.
|
|
* @example
|
|
*
|
|
* R.range(1, 5); //=> [1, 2, 3, 4]
|
|
* R.range(50, 53); //=> [50, 51, 52]
|
|
*/
|
|
var range = /*#__PURE__*/_curry2(function range(from, to) {
|
|
if (!(_isNumber(from) && _isNumber(to))) {
|
|
throw new TypeError('Both arguments to range must be numbers');
|
|
}
|
|
var result = [];
|
|
var n = from;
|
|
while (n < to) {
|
|
result.push(n);
|
|
n += 1;
|
|
}
|
|
return result;
|
|
});
|
|
export default range; |