Skip to content

Commit 94f0cbe

Browse files
committed
Update docs and code style
1 parent 00a6162 commit 94f0cbe

File tree

9 files changed

+19
-21
lines changed

9 files changed

+19
-21
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ var bool = reWhitespace.REGEXP.test( '\\n' );
7878
var reWhitespace = require( '@stdlib/regexp/whitespace' );
7979

8080
var RE_WHITESPACE = reWhitespace();
81-
var bool;
82-
var str;
8381

84-
bool = RE_WHITESPACE.test( 'beep boop' );
82+
var bool = RE_WHITESPACE.test( 'beep boop' );
8583
// returns true
8684

8785
bool = RE_WHITESPACE.test( '\n' );
@@ -96,7 +94,7 @@ bool = RE_WHITESPACE.test( '\t' );
9694
bool = RE_WHITESPACE.test( 'beep' );
9795
// returns false
9896

99-
str = 'This is\na newline\r\ndelimited string.';
97+
var str = 'This is\na newline\r\ndelimited string.';
10098

10199
var arr = str.split( RE_WHITESPACE );
102100
// returns [ 'This', 'is', 'a', 'newline', '', 'delimited', 'string.' ]

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ var reWhitespace = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33-
var RE_WHITESPACE = reWhitespace();
3433
var bool;
3534
var str;
3635
var i;
3736

3837
b.tic();
3938
for ( i = 0; i < b.iterations; i++ ) {
4039
str = 'beep boop\u000D\u000A'+fromCodePoint( 97+(i%26) )+'foo bar';
41-
bool = RE_WHITESPACE.test( str );
40+
bool = reWhitespace.REGEXP.test( str );
4241
if ( !isBoolean( bool ) ) {
4342
b.fail( 'should return a boolean' );
4443
}

lib/node_modules/@stdlib/regexp/whitespace/docs/types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
// TypeScript Version: 2.0
2020

2121
/**
22-
* Interface for a regular expression to match space characters.
22+
* Interface for a regular expression to match white space characters.
2323
*/
2424
interface ReWhitespace {
2525
/**
26-
* Returns a regular expression to match a space character.
26+
* Returns a regular expression to match a white space character.
2727
*
2828
* @returns regular expression
2929
*
@@ -39,7 +39,7 @@ interface ReWhitespace {
3939
(): RegExp;
4040

4141
/**
42-
* Regular expression to match a space character.
42+
* Regular expression to match a white space character.
4343
*
4444
* @example
4545
* var bool = reWhitespace.REGEXP.test( 'a' );
@@ -49,7 +49,7 @@ interface ReWhitespace {
4949
}
5050

5151
/**
52-
* Returns a regular expression to match a space.
52+
* Returns a regular expression to match a white space character.
5353
*
5454
* @returns regular expression
5555
*

lib/node_modules/@stdlib/regexp/whitespace/lib/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,13 @@
1919
'use strict';
2020

2121
/**
22-
* Return a regular expression to match a whitespace character.
23-
*
24-
* ## Notes
25-
*
26-
* - Matches the 25 characters defined as whitespace ("WSpace=Y","WS") characters in the Unicode 9.0 character database.
27-
* - Matches one related whitespace character without the Unicode character property "WSpace=Y" (zero width non-breaking space which was deprecated as of Unicode 3.2).
22+
* Return a regular expression to match a white space character.
2823
*
2924
* @module @stdlib/regexp/whitespace
3025
*
3126
* @example
3227
* var reWhitespace = require( '@stdlib/regexp/whitespace' );
28+
*
3329
* var RE_WHITESPACE = reWhitespace();
3430
*
3531
* var bool = RE_WHITESPACE.test( ' ' );

lib/node_modules/@stdlib/regexp/whitespace/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MAIN //
2222

2323
/**
24-
* Returns a regular expression to match a space.
24+
* Returns a regular expression to match a white space character.
2525
*
2626
* @returns {RegExp} regular expression
2727
*

lib/node_modules/@stdlib/regexp/whitespace/lib/regexp.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var reWhitespace = require( './main.js' );
2626
// MAIN //
2727

2828
/**
29-
* Matches a space.
29+
* Matches a white space character.
3030
*
3131
* Regular expression: `/[\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/`
3232
*
@@ -112,6 +112,11 @@ var reWhitespace = require( './main.js' );
112112
* - `\uFEFF`
113113
* - zero width non-breaking space
114114
*
115+
* ## Notes
116+
*
117+
* - Matches the 25 characters defined as white space ("WSpace=Y","WS") characters in the Unicode 9.0 character database.
118+
* - Matches one related white space character without the Unicode character property "WSpace=Y" (zero width non-breaking space which was deprecated as of Unicode 3.2).
119+
*
115120
* @constant
116121
* @type {RegExp}
117122
* @default /[\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/

lib/node_modules/@stdlib/regexp/whitespace/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/whitespace",
33
"version": "0.0.0",
4-
"description": "Return a regular expression to match a whitespace character.",
4+
"description": "Return a regular expression to match a white space character.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tape( 'main export is a function', function test( t ) {
3232
t.end();
3333
});
3434

35-
tape( 'the function returns a regular expression to match whitespace character sequences', function test( t ) {
35+
tape( 'the function returns a regular expression to match white space character sequences', function test( t ) {
3636
var REGEXP = reWhitespace();
3737
var values;
3838
var i;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tape( 'main export is a regular expression', function test( t ) {
3232
t.end();
3333
});
3434

35-
tape( 'the regular expression matches whitespace character sequences', function test( t ) {
35+
tape( 'the regular expression matches white space character sequences', function test( t ) {
3636
var values;
3737
var i;
3838

0 commit comments

Comments
 (0)