string-to-chunks
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Convert String to chunks of different sizes

Build and test

Getting started

$ yarn add string-to-chunks

Usage

import stringToChunks from 'string-to-chunks';

const value = '12345';
const chunksNeeded = [1, 2, 2];

const chunked = stringToChunks(value, chunksNeeded);

console.log(chunked); // ['1', '23', '45'];

Readme

Keywords

none

Package Sidebar

Install

npm i string-to-chunks

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

6.23 kB

Total Files

5

Last publish

Collaborators

  • shahen