File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ but may return a value of any type that will be formatted accordingly by
439439const util = require (' util' );
440440
441441const obj = { foo: ' this will not show up in the inspect() output' };
442- obj[util .inspect .custom ] = function (depth ) {
442+ obj[util .inspect .custom ] = (depth ) => {
443443 return { bar: ' baz' };
444444};
445445
@@ -549,7 +549,7 @@ function doSomething(foo, callback) {
549549 // ...
550550}
551551
552- doSomething[util .promisify .custom ] = function (foo ) {
552+ doSomething[util .promisify .custom ] = (foo ) => {
553553 return getPromiseSomehow ();
554554};
555555
@@ -564,8 +564,8 @@ standard format of taking an error-first callback as the last argument.
564564For example, with a function that takes in ` (foo, onSuccessCallback, onErrorCallback) ` :
565565
566566``` js
567- doSomething[util .promisify .custom ] = function (foo ) {
568- return new Promise (function (resolve , reject ) {
567+ doSomething[util .promisify .custom ] = (foo ) => {
568+ return new Promise ((resolve , reject ) => {
569569 doSomething (foo, resolve, reject);
570570 });
571571};
You can’t perform that action at this time.
0 commit comments