File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lib/node_modules/@stdlib/regexp/dirname-windows/benchmark Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44
55var bench = require ( '@stdlib/bench' ) ;
66var isString = require ( '@stdlib/assert/is-string' ) . isPrimitive ;
7+ var fromCodePoint = require ( '@stdlib/string/from-code-point' ) ;
78var pkg = require ( './../package.json' ) . name ;
89var RE_DIRNAME_WINDOWS = 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 = 'C:\\foo\\bar\\beep\\boop' + String . fromCharCode ( 97 + ( i % 26 ) ) + '.js' ;
21+ str = 'C:\\foo\\bar\\beep\\boop' + fromCodePoint ( 97 + ( i % 26 ) ) + '.js' ;
2122 out = RE_DIRNAME_WINDOWS . exec ( str ) ;
2223 if ( ! out || ! isString ( out [ 1 ] ) ) {
2324 b . fail ( 'should capture a dirname' ) ;
@@ -26,8 +27,7 @@ bench( pkg, function benchmark( b ) {
2627 b . toc ( ) ;
2728 if ( ! out || ! isString ( out [ 1 ] ) ) {
2829 b . fail ( 'should capture a dirname' ) ;
29- } else {
30- b . pass ( 'benchmark finished' ) ;
3130 }
31+ b . pass ( 'benchmark finished' ) ;
3232 b . end ( ) ;
3333} ) ;
You can’t perform that action at this time.
0 commit comments