Skip to content

Commit b743be8

Browse files
committed
chore: updated corresponding example in README
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 8bdf018 commit b743be8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • lib/node_modules/@stdlib/datasets/us-states-names-capitals

lib/node_modules/@stdlib/datasets/us-states-names-capitals/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ var t = table();
103103
<!-- eslint no-undef: "error" -->
104104

105105
```javascript
106+
var format = require( '@stdlib/string/format' );
106107
var capitalize = require( '@stdlib/string/capitalize' );
107108
var table = require( '@stdlib/datasets/us-states-names-capitals' );
108109

@@ -123,7 +124,7 @@ function getCapital( state ) {
123124

124125
// Ensure a valid state name was provided...
125126
if ( capital === void 0 ) {
126-
throw new Error( 'unrecognized state name. Value: `' + state + '`.' );
127+
throw new Error( format( 'unrecognized state name. Value: `%s`.', state ) );
127128
}
128129
return capital;
129130
}

0 commit comments

Comments
 (0)