You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stripHtml('<div class="container"><h1>Title</h1><p>Paragraph with <strong>bold</strong> and <em>italic</em></p></div>');
90
+
});
91
+
92
+
bench('wordCount - short text',()=>{
93
+
wordCount('Hello world test');
94
+
});
95
+
96
+
bench('wordCount - long text',()=>{
97
+
wordCount('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.');
98
+
});
99
+
});
100
+
101
+
describe('String Generation Benchmarks',()=>{
102
+
bench('randomString - length 10',()=>{
103
+
randomString(10);
104
+
});
105
+
106
+
bench('randomString - length 50',()=>{
107
+
randomString(50);
108
+
});
109
+
110
+
bench('randomString - custom charset',()=>{
111
+
randomString(20,'0123456789ABCDEF');
112
+
});
113
+
114
+
bench('hashString - short',()=>{
115
+
hashString('hello');
116
+
});
117
+
118
+
bench('hashString - long',()=>{
119
+
hashString('The quick brown fox jumps over the lazy dog. This is a longer string to hash.');
0 commit comments