UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

17 lines (14 loc) 401 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. */ // 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); } }; export { rangeWithCallback };