Skip to content

doc: add initial constants module documentation - #6505

Closed
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:doc-constants-module
Closed

doc: add initial constants module documentation#6505
jasnell wants to merge 3 commits into
nodejs:masterfrom
jasnell:doc-constants-module

Conversation

@jasnell

@jasnelljasnell commented May 1, 2016

Copy link
Copy Markdown
Member
Checklist
  • documentation is changed or added
Affected core subsystem(s)

doc (constants)

Description of change

This is a work in progress

Begin documentation of the constants module.
/cc @nodejs/documentation @addaleax @nodejs/crypto

Note to @nodejs/crypto: there appear to be several of the openssl related constants that are not recommended for use. I'd recommend that we indicate those and possible even do a hard deprecation for those at some point (but not in this PR)

Refs: #6492, #6494

@jasnelljasnell added wip Issues and PRs that are still a work in progress. doc Issues and PRs related to the documentations. labels May 1, 2016
Comment threaddoc/api/constants.md Outdated
#### constants.RSA_PKCS1_PSS_PADDING
#### constants.POINT_CONVERSION_COMPRESSED
#### constants.POINT_CONVERSION_UNCOMPRESSED
3### constants.POINT_CONVERSION_HYBRID

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown typo here :)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh ... fat fingers

Comment threaddoc/api/constants.md

### constants.X_OK

Flag indicating that the file can be executed by the calling process.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d add something like:

This flag is meant for use with [`fs.access()`][].

to (each of?) these, otherwise people might confuse them with O_RDONLY etc.

[`fs.access()`]: fs.html#fs_fs_access_path_mode_callback

@addaleax

Copy link
Copy Markdown
Member

Cool, definitely thanks for the work you put into this!

@jasnell

Copy link
Copy Markdown
MemberAuthor

Of course. It's not very helpful for me to complain about there not being documentation for something unless I'm willing to help get the documentation put together, right? ;-)

@Fishrock123

Copy link
Copy Markdown
Contributor

this is big enough I think it warrants direct ctc coversation

@jasnell

Copy link
Copy Markdown
MemberAuthor

@nodejs/ctc ... Any thoughts on this?
@Fishrock123 ... Any specific concerns?

@eljefedelrodeodeljefe

Copy link
Copy Markdown
Contributor

Would a table not suite the plenty constants better?

@jasnell

Copy link
Copy Markdown
MemberAuthor

Possibly. Went with this initially because it's a closer fit to the
existing doc style. Personally I'd prefer something more compact tho
(actually, what I'd really prefer is for these to be documented with and
exposed by the modules for which they are most relevant)
On May 1, 2016 5:08 PM, "Robert Jefe Lindstädt" notifications@github.com
wrote:

Would a table not suite the plenty constants better?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#6505 (comment)

@eljefedelrodeodeljefe

Copy link
Copy Markdown
Contributor

Ah, you mean like the "events"-section. That sounds even better. Would be hugely favoring this.

Comment threaddoc/api/constants.md

The following error constants are adapted directly from the POSIX `errno`
standards. See http://man7.org/linux/man-pages/man3/errno.3.html for more
details about specific error constants.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the Errors documentation page maybe?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can, but those are far from complete. We should either fill those out there more or move that detail into here. How those are documented leaves much to be desired.

@Fishrock123

Fishrock123 commented May 2, 2016

Copy link
Copy Markdown
Contributor

Is the object returned by constants actually read-only? Should we be freezing this or something?

@addaleax

Copy link
Copy Markdown
Member

@Fishrock123 No, only the constants themselves are all read-only properties, at least right now.

Comment threaddoc/api/constants.md

### constants.ECHILD

Indicates that there are no child processes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing period at the end of the line.

@jasnell

Copy link
Copy Markdown
MemberAuthor

@cjihrig ... Thanks for the edits, I have yet to go through and do a proofread through this. Before I got too far into it tho, we need to decide if we even want to document these in this way or take a different approach. I wouldn't want you to spend too much time doing a proofread if we ultimately decide not to do this.

@jasnell

Copy link
Copy Markdown
MemberAuthor

Closing in favor of #6534

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.wipIssues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jasnell@addaleax@Fishrock123@eljefedelrodeodeljefe@cjihrig