An open API service indexing awesome lists of open source software.

https://github.com/richienb/split-chars

Split a string on each full character.
https://github.com/richienb/split-chars

Last synced: 19 days ago
JSON representation

Split a string on each full character.

Awesome Lists containing this project

README

          

# split-chars

Split a string on each full character.

## Install

```sh
npm install split-chars
```

## Usage

```js
import splitChars from 'split-chars';

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

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

## API

### splitChars(input)

#### input

Type: `string`

The string to split.