split string in chunks of 3 javascript 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'));
}