File tree Expand file tree Collapse file tree 7 files changed +10
-10
lines changed
repl-txt/rules/resolvable-aliases/lib
scaffold/test-validate-js/test/fixtures
fs/resolve-parent-paths/lib Expand file tree Collapse file tree 7 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function countLines( str ) {
49
49
*
50
50
* @private
51
51
* @param {string } pkg - package path
52
- * @returns {string|null } package alias
52
+ * @returns {( string|null) } package alias
53
53
*/
54
54
function pkg2alias ( pkg ) {
55
55
var i ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ var format = require( '@stdlib/string/format' );
39
39
* @param {(Buffer|string)} [options.html] - HTML content to serve
40
40
* @param {(Buffer|string)} [options.javascript] - JavaScript script to serve
41
41
* @param {boolean} [options.open] - indicates whether to launch a web browser
42
- * @returns {Error|null} error or null
42
+ * @returns {( Error|null) } error or null
43
43
*
44
44
* @example
45
45
* var options = {
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ function all( paths, dir ) {
143
143
* @private
144
144
* @param {Array<string> } paths - paths to resolve
145
145
* @param {string } dir - base directory
146
- * @returns {Array<string|null> } resolved paths
146
+ * @returns {Array<( string|null) > } resolved paths
147
147
*/
148
148
function each ( paths , dir ) {
149
149
var count ;
@@ -189,7 +189,7 @@ function each( paths, dir ) {
189
189
* @throws {TypeError } first argument must be an array of strings
190
190
* @throws {TypeError } options argument must be an object
191
191
* @throws {TypeError } must provide valid options
192
- * @returns {Array<string|null> } resolved paths
192
+ * @returns {Array<( string|null) > } resolved paths
193
193
*
194
194
* @example
195
195
* var paths = resolveParentPaths( [ 'package.json', 'package-lock.json' ] );
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ var hasOwnProp = Object.prototype.hasOwnProperty;
39
39
* @param {Options } options - function options
40
40
* @param {string } [options.basedir] - base search directory
41
41
* @param {string } [options.paths] - path convention
42
- * @returns {Error|null } error or null
42
+ * @returns {( Error|null) } error or null
43
43
*
44
44
* @example
45
45
* var options = {
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ var reEOL = require( '@stdlib/regexp/eol' );
37
37
* @param {Function } [reviver] - transformation function applied to each line
38
38
* @throws {TypeError } first argument must be a string
39
39
* @throws {TypeError } reviver must be a function
40
- * @returns {Array|Error } array of parsed values or an error
40
+ * @returns {( Array|Error) } array of parsed values or an error
41
41
*
42
42
* @example
43
43
* var out = parseNDJSON( '{"name":"John"}\n{"name":"Doe"}' );
Original file line number Diff line number Diff line change @@ -65,17 +65,17 @@ function wrap( fcn, thisArg ) {
65
65
*
66
66
* @private
67
67
* @param {...* } [args] - function arguments
68
- * @returns {*|Error } returned value or an error object
68
+ * @returns {( *|Error) } returned value or an error object
69
69
*/
70
70
function wrapped ( ) {
71
71
var args ;
72
72
var len ;
73
73
var i ;
74
74
75
75
len = arguments . length ;
76
- args = new Array ( len ) ;
76
+ args = [ ] ;
77
77
for ( i = 0 ; i < len ; i ++ ) {
78
- args [ i ] = arguments [ i ] ;
78
+ args . push ( arguments [ i ] ) ;
79
79
}
80
80
try {
81
81
return fcn . apply ( ctx , args ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ var isError = require( '@stdlib/assert/is-error' );
29
29
* Wraps `require` in a try/catch block.
30
30
*
31
31
* @param {string } id - module id
32
- * @returns {*|Error } `module.exports` of the resolved module or an error
32
+ * @returns {( *|Error) } `module.exports` of the resolved module or an error
33
33
*
34
34
* @example
35
35
* var out = tryRequire( 'beepboop' );
You can’t perform that action at this time.
0 commit comments