Skip to content

Commit 42acdf2

Browse files
committed
docs: update examples
--- 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 650bf8a commit 42acdf2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/utils/async/map-values

lib/node_modules/@stdlib/utils/async/map-values/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,15 @@ var obj1 = {
267267
};
268268

269269
f( obj1, done );
270-
// => { 'a': 'beep:1', 'b': 'beep:2' }
270+
// e.g., => { 'a': 'beep:1', 'b': 'beep:2' }
271271

272272
var obj2 = {
273273
'c': 3,
274274
'd': 4
275275
};
276276

277277
f( obj2, done );
278-
// => { 'c': 'beep:3', 'd': 'beep:4' }
278+
// e.g., => { 'c': 'beep:3', 'd': 'beep:4' }
279279
```
280280

281281
The function accepts the same `options` as `mapValuesAsync()`.
@@ -313,6 +313,7 @@ The function accepts the same `options` as `mapValuesAsync()`.
313313
```javascript
314314
var resolve = require( 'path' ).resolve;
315315
var stats = require( 'fs' ).stat;
316+
var format = require( '@stdlib/string/format' );
316317
var mapValuesAsync = require( '@stdlib/utils/async/map-values' );
317318

318319
var files = {
@@ -332,7 +333,7 @@ function getStats( file, next ) {
332333

333334
function onStats( error, data ) {
334335
if ( error ) {
335-
error = new Error( 'unable to retrieve stats: '+file );
336+
error = new Error( format( 'unable to retrieve stats: %s', file ) );
336337
return next( error );
337338
}
338339
next( null, data );

0 commit comments

Comments
 (0)