range-with-names
v1.2.0
Published
Creates an array of objects from given range, each object contain number and his name
Downloads
3
Maintainers
Readme
rangeWithNames
Creates an array of objects from given range, each object contain number and his name
Usage: rangeWithNames(start: number, end: number, step?: number): Array<{ number: number, name: string }>
import { rangeWithNames } from 'range-with-names'
rangeWithNames(1,3)
// Output: [ { number: 1, name: 'one' }, { number: 2, name: 'two' } ]
rangeWithNames(3,5)
// Output: [ { number: 3, name: 'three' }, { number: 4, name: 'four' } ]
This module exported from utilizes project.