range-with-names
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i range-with-names

      Weekly Downloads

      1

      Version

      1.2.0

      License

      MIT

      Unpacked Size

      56 kB

      Total Files

      5

      Last publish

      Collaborators

      • natqe3