Skip to content
On this page

chars

Separates a string into an array of characters.

Usage

ts
import { chars } from '@screaming/utils'

chars('ribbit')
// ['r', 'i', 'b', 'b', 'i', 't']
1
2
3
4

Type Definitions

ts
/**
 * @param str - The string.
 * @returns The string's characters.
 */
export declare function chars(str: string): string[]
1
2
3
4
5