@tempots/std

mapChars() function

It maps a string character by character using callback.

Signature:

mapChars: (callback: (c: string) => T, value: string) => T[]

Parameters

Parameter

Type

Description

callback

(c: string) => T

The function to apply to each character in the string.

value

string

The string to map.

Returns: T[]

An array of the mapped characters.