File tree 1 file changed +3
-3
lines changed
lib/node_modules/@stdlib/regexp/unc-path/benchmark
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
// MODULES //
4
4
5
5
var bench = require ( '@stdlib/bench' ) ;
6
+ var fromCodePoint = require ( '@stdlib/string/from-code-point' ) ;
6
7
var pkg = require ( './../package.json' ) . name ;
7
8
var RE_UNC_PATH = require ( './../lib' ) ;
8
9
@@ -16,7 +17,7 @@ bench( pkg, function benchmark( b ) {
16
17
17
18
b . tic ( ) ;
18
19
for ( i = 0 ; i < b . iterations ; i ++ ) {
19
- str = '\\\\server\\share\\foo\\bar\\baz:a:' + String . fromCharCode ( 97 + ( i % 26 ) ) ;
20
+ str = '\\\\server\\share\\foo\\bar\\baz:a:' + fromCodePoint ( 97 + ( i % 26 ) ) ;
20
21
out = RE_UNC_PATH . exec ( str ) ;
21
22
if ( ! out || ! out . length ) {
22
23
b . fail ( 'should parse an UNC path' ) ;
@@ -25,8 +26,7 @@ bench( pkg, function benchmark( b ) {
25
26
b . toc ( ) ;
26
27
if ( ! out || ! out . length ) {
27
28
b . fail ( 'should parse an UNC path' ) ;
28
- } else {
29
- b . pass ( 'benchmark finished' ) ;
30
29
}
30
+ b . pass ( 'benchmark finished' ) ;
31
31
b . end ( ) ;
32
32
} ) ;
You can’t perform that action at this time.
0 commit comments