Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just
provided
->passed
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a preposition? 'When called, the
completer
function is passed the current line...'? I am a bit confused by this passive voice. Can we say 'Provide the function a line' without a preposition? It seems we can say 'Pass the function a line', so the passive can be without a preposition here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
passed
is transitive so works.When called, the completer function is provided the current line entered by the user
===When the completer function is called (by Node.js), the current line entered by the user is passed to it
.I know we normally prefer the active voice, nothing against using that here, the only issue is that AIUI this is a callback function, so it
is called
by the Node.js readline code, the arguments are passed into it, and Node expects it to return an Array. So you can't sayProvide the function a line
, because the user doesn't do that, Node does.You could maybe say something like:
I defer to you on what's clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shall use your last variant and let's see if anybody come along with us)