Skip to content

chars

Separates a string into an array of characters.

Usage

ts
import { chars } from 'tsu'

chars('ribbit')
// ['r', 'i', 'b', 'b', 'i', 't']

Type Definitions

ts
/**
 * @param str - The string.
 * @returns The string's characters.
 */
function chars(str: string): string[]

Released under the MIT License.