Skip to content

Commit 220a673

Browse files
committed
fix: update to return false for empty strings
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 7c9afed commit 220a673

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/node_modules/@stdlib/assert/is-arrow-function/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var isArrowFunction = require( '@stdlib/assert/is-arrow-function' );
3232

3333
#### isArrowFunction( value )
3434

35-
Tests if a `value` is a an [`arrow function`][mdn-arrow-function] such as `( a, b ) => a + b`, `x => x`, or `( x ) => { return x*x; }`.
35+
Tests if a `value` is an [`arrow function`][mdn-arrow-function] such as `( a, b ) => a + b`, `x => x`, or `( x ) => { return x*x; }`.
3636

3737
<!-- eslint-disable func-style, no-restricted-syntax, node/no-unsupported-features/es-syntax -->
3838

lib/node_modules/@stdlib/assert/is-duration-string/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var RE_DURATION_STRING = /^(?:\d+d)?(?:\d+h)?(?:\d+m)?(?:\d+s)?(?:\d+ms)?$/i;
6161
* // returns true
6262
*/
6363
function isDurationString( value ) {
64-
if ( !isString( value ) ) {
64+
if ( !isString( value ) || value.length === 0 ) {
6565
return false;
6666
}
6767
return RE_DURATION_STRING.test( value );

lib/node_modules/@stdlib/assert/is-duration-string/test/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ tape( 'the function returns `false` if provided a non-duration string', function
6161
var i;
6262

6363
values = [
64+
'',
6465
'5',
6566
'beep',
6667
'1',

0 commit comments

Comments
 (0)