@plexis/to-chunks

0.0.22 • Public • Published

@plexis/to-chunks

Splits the input text into an array of chunks.

Installation npm i @plexis/to-chunks

Usage

import toChunks from '@plexis/to-chunks';

toChunks('Hello world');
// => ['H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']

toChunks('   ');
// => [' ', ' ', ' ']

toChunks('1234567', 2);
// => ['12', '34', '56', '7']

toChunks('1234567', 6);
// => ['123456', '7']

Aliases

import toChunks from '@plexis/to-chunks';
import {toChunks, chop} from 'plexis';

Readme

Keywords

Package Sidebar

Install

npm i @plexis/to-chunks

Weekly Downloads

2

Version

0.0.22

License

MIT

Unpacked Size

4.07 kB

Total Files

6

Last publish

Collaborators

  • vorillaz