We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c866c1 commit c78f029Copy full SHA for c78f029
lib/sessionManager/utils.ts
@@ -2,9 +2,5 @@ export function splitString(str: string, length: number): string[] {
2
if (length <= 0) {
3
return [];
4
}
5
- const result = [];
6
- for (let i = 0; i < str.length; i += length) {
7
- result.push(str.slice(i, i + length));
8
- }
9
- return result;
+ return str.match(new RegExp(`.{1,${length}}`, 'g')) || [];
10
0 commit comments