Skip to content

Commit 007b9ff

Browse files
committed
Update docs and clean-up
1 parent eccc13f commit 007b9ff

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

lib/node_modules/@stdlib/regexp/semver/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# Semantic Version
2222

23-
> [Regular expression][regexp] to match a [semantic version][semantic-version] string.
23+
> [Regular expression][mdn-regexp] to match a [semantic version][semantic-version] string.
2424
2525
<section class="usage">
2626

@@ -32,7 +32,7 @@ var reSemVer = require( '@stdlib/regexp/semver' );
3232

3333
#### reSemVer()
3434

35-
Return a [regular expression][regexp] to match a [semantic version][semantic-version] string.
35+
Returns a [regular expression][mdn-regexp] to match a [semantic version][semantic-version] string.
3636

3737
```javascript
3838
var RE_SEMVER = reSemVer();
@@ -71,7 +71,7 @@ parts = RE_SEMVER.exec( '1.0.0-alpha.1' );
7171

7272
#### reSemVer.REGEXP
7373

74-
[Regular expression][regexp] to match a [semantic version][semantic-version] string.
74+
[Regular expression][mdn-regexp] to match a [semantic version][semantic-version] string.
7575

7676
```javascript
7777
var parts = reSemVer.REGEXP.exec( '0.2.3' );
@@ -149,7 +149,7 @@ bool = RE_SEMVER.test( version );
149149

150150
<section class="links">
151151

152-
[regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
152+
[mdn-regexp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
153153

154154
[semantic-version]: https://semver.org/
155155

lib/node_modules/@stdlib/regexp/semver/benchmark/benchmark.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var reSemVer = require( './../lib' );
3030
bench( pkg, function benchmark( b ) {
3131
var values;
3232
var out;
33-
var str;
3433
var i;
3534

3635
values = [
@@ -59,8 +58,7 @@ bench( pkg, function benchmark( b ) {
5958

6059
b.tic();
6160
for ( i = 0; i < b.iterations; i++ ) {
62-
str = values[ i % values.length ];
63-
out = reSemVer.REGEXP.exec( str );
61+
out = reSemVer.REGEXP.exec( values[ i % values.length ] );
6462
if ( !out || !out.length ) {
6563
b.fail( 'should match a semantic version string' );
6664
}

lib/node_modules/@stdlib/regexp/semver/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import reSemVer = require( './index' );
3232
reSemVer( [], 123 ); // $ExpectError
3333
}
3434

35-
// Attached to main export is a `REGEXP` property that is a regular expression...
35+
// Attached to main export is a `REGEXP` property whose value is a regular expression...
3636
{
3737
// tslint:disable-next-line:no-unused-expression
3838
reSemVer.REGEXP; // $ExpectType RegExp

lib/node_modules/@stdlib/regexp/semver/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/regexp/semver",
33
"version": "0.0.0",
4-
"description": "Return a regular expression to match a semantic version string.",
4+
"description": "Regular expression to match a semantic version string.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

lib/node_modules/@stdlib/regexp/semver/test/test.main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ tape( 'the returned regular expression matches a semver version string', functio
5353
'1.0.0+exp.sha.5114f85'
5454
];
5555
for ( i = 0; i < values.length; i++ ) {
56-
t.equal( RE.test( values[i] ), true, 'returns true when provided '+values[i] );
56+
t.equal( RE.test( values[i] ), true, 'returns expected value when provided '+values[i] );
5757
}
5858
t.end();
5959
});
@@ -77,7 +77,7 @@ tape( 'the returned regular expression does not match a non-semver version strin
7777
];
7878

7979
for ( i = 0; i < values.length; i++ ) {
80-
t.equal( RE.test( values[i] ), false, 'returns false when provided '+values[i] );
80+
t.equal( RE.test( values[i] ), false, 'returns expected value when provided '+values[i] );
8181
}
8282
t.end();
8383
});

lib/node_modules/@stdlib/regexp/semver/test/test.regexp.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
'use strict;'
19+
'use strict';
2020

2121
// MODULES //
2222

@@ -52,7 +52,7 @@ tape( 'the regular expression matches valid semantic version strings', function
5252
];
5353

5454
for ( i = 0; i < values.length; i++ ) {
55-
t.equal( RE.test( values[i] ), true, 'returns true when provided '+values[i] );
55+
t.equal( RE.test( values[i] ), true, 'returns expected value when provided '+values[i] );
5656
}
5757
t.end();
5858
});
@@ -74,7 +74,7 @@ tape( 'the regular expression does not match invalid semantic version strings',
7474
];
7575

7676
for ( i = 0; i < values.length; i++ ) {
77-
t.equal( RE.test( values[i] ), false, 'returns false when provided '+values[i] );
77+
t.equal( RE.test( values[i] ), false, 'returns expected value when provided '+values[i] );
7878
}
7979
t.end();
8080
});

0 commit comments

Comments
 (0)