UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

19 lines (15 loc) 433 B
/** * Copyright IBM Corp. 2020, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; // Iterates through a numeric range and calls callback // function for each iteration const rangeWithCallback = (start, end, fn) => { for (let i = start; i <= end; i++) { fn(i); } }; exports.rangeWithCallback = rangeWithCallback;