Skip to content

Commit 1c9b572

Browse files
committed
Use string utility
1 parent c845b42 commit 1c9b572

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/string/remove-punctuation/benchmark

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/string/remove-punctuation/benchmark/benchmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
var bench = require( '@stdlib/bench' );
66
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
7+
var fromCodePoint = require( '@stdlib/string/from-code-point' );
78
var pkg = require( './../package.json' ).name;
89
var removePunctuation = require( './../lib' );
910

@@ -17,7 +18,7 @@ bench( pkg, function benchmark( b ) {
1718

1819
b.tic();
1920
for ( i = 0; i < b.iterations; i++ ) {
20-
str = String.fromCharCode( i%126 ) + 'eep boop!"\'(),–.:;<>?`{}|~/\\[]';
21+
str = fromCodePoint( i%126 ) + 'eep boop!"\'(),–.:;<>?`{}|~/\\[]';
2122
out = removePunctuation( str );
2223
if ( !isString( out ) ) {
2324
b.fail( 'should return a string' );

0 commit comments

Comments
 (0)