split string in chunks by character js code example
Example: how to split a string into chunks nodejs
function chunkString(str, length) {
return str.match(new RegExp('.{1,' + length + '}', 'g'));
}
function chunkString(str, length) {
return str.match(new RegExp('.{1,' + length + '}', 'g'));
}