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.
- Host: GitHub
- URL: https://github.com/richienb/split-chars
- Owner: Richienb
- License: mit
- Created: 2020-02-22T14:25:24.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-07-18T04:07:45.000Z (over 3 years ago)
- Last Synced: 2025-02-18T03:36:02.381Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 92.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
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.