UNPKG

hd-utils

Version:

A handy utils for modern JS developers

12 lines (11 loc) 524 B
import { Key, StringOrNumber } from '../types'; /** * @description It takes two arguments, a and b, and returns an array of numbers or letters from a to b * @example arrayRange(1,5) => [ 1, 2, 3, 4, 5 ] * @example arrayRange("a", "c") => ["a", "b", "c"] * @param {Key} a - The starting point of the array. * @param {Key} b - The ending value of the range. * @param {number} step - The step value. * @returns An array of strings. */ export default function arrayRange(a: Key, b: Key, step: number): StringOrNumber[];