Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/typical/mod.ts>StrNum.DigitToTup

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias StrNum.DigitToTup
import { type StrNum } from "https://deno.land/x/rimbu@0.13.5/typical/mod.ts";
const { DigitToTup } = StrNum;

A table from StringDigits to an array that repeats the elements of given array T digit amount of times. 'deca' is used to represent an exponent of 10

Type Parameters

optional
T extends unknown[] = [unknown]
definition: { 0: []; 1: T; 2: [...T, ...T]; 3: [...T, ...T, ...T]; 4:
[
...T,
...T,
...T,
...T,
]
; 5:
[
...T,
...T,
...T,
...T,
...T,
]
; 6:
[
...T,
...T,
...T,
...T,
...T,
...T,
]
; 7:
[
...T,
...T,
...T,
...T,
...T,
...T,
...T,
]
; 8:
[
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
]
; 9:
[
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
]
; 10:
[
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
...T,
]
; }