4.0.0 • Published 2 years ago

split-chars v4.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

split-chars

Split a string on each full character.

Install

npm install split-chars

Usage

import splitChars from 'split-chars';

'🏴󠁧󠁢󠁥󠁮󠁧󠁿❤️谢👪'.split('');
//=> ['�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '❤', '️', '谢', '�', '�']

[...splitChars('🏴󠁧󠁢󠁥󠁮󠁧󠁿❤️谢👪')];
//=> ['🏴󠁧󠁢󠁥󠁮󠁧󠁿', '❤️', '谢', '👪']

API

splitChars(input)

input

Type: string

The string to split.