When I read this Node.js API docs, it raises a few questions for me.
"callback <Function>" in the header. Why am I wrong in that thinking?Documentation on fs:
The asynchronous form always takes a completion callback as its last argument. The arguments passed to the completion callback depend on the method, but the first argument is always reserved for an exception. If the operation was completed successfully, then the first argument will be
nullorundefined.
So, yes, assume callback to fs methods to have signature (err) unless noted otherwise. You should not assume this to be the signature of other packages, unless it is noted similarly.
Is there a standard doc producing tool like javadoc in javascript?
What options are available for documenting your Javascript code?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With