We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c845b42 commit 1c9b572Copy full SHA for 1c9b572
lib/node_modules/@stdlib/string/remove-punctuation/benchmark/benchmark.js
@@ -4,6 +4,7 @@
4
5
var bench = require( '@stdlib/bench' );
6
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
7
+var fromCodePoint = require( '@stdlib/string/from-code-point' );
8
var pkg = require( './../package.json' ).name;
9
var removePunctuation = require( './../lib' );
10
@@ -17,7 +18,7 @@ bench( pkg, function benchmark( b ) {
17
18
19
b.tic();
20
for ( i = 0; i < b.iterations; i++ ) {
- str = String.fromCharCode( i%126 ) + 'eep boop!"\'(),–.:;<>?`{}|~/\\[]';
21
+ str = fromCodePoint( i%126 ) + 'eep boop!"\'(),–.:;<>?`{}|~/\\[]';
22
out = removePunctuation( str );
23
if ( !isString( out ) ) {
24
b.fail( 'should return a string' );
0 commit comments