Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 usage instructions are inconsistent #30

Open
DerekNonGeneric opened this issue Mar 10, 2022 · 2 comments
Open

📖 usage instructions are inconsistent #30

DerekNonGeneric opened this issue Mar 10, 2022 · 2 comments
Assignees
Milestone

Comments

@DerekNonGeneric
Copy link
Member

DerekNonGeneric commented Mar 10, 2022

The first line of the code snippet in the “Usage” (instructions) section of the README.md file of this repository state that the imported function is named mdTable2json as can be seen below; when in reality, the name of this particular function is mdTbl2json.

import { mdTable2json } from '@openinf/util-md-table';

I have struggled with deciding whether it makes sense to abbreviate or not, as we still have no style guide dictating whether abbreviations like this are acceptable but should be relatively easy to fix.

The rationale for tbl is that it is a very commonly-used way of abbreviating “table” especially in Visual Basic style guides, which many users of this particular module would hopefully appreciate.

@DerekNonGeneric
Copy link
Member Author

DerekNonGeneric commented Mar 17, 2022

The code example just below the problematic import uses a joiner of \n, but depending on the platform, it may be worthwhile to use something like the following.

import { EOL as newlineMarker } from 'node:os';

const sampleTable = [
'| Col1  | Col2  | Col3  | Col4  |',
'|:-----:|:-----:|:-----:|:-----:|',
'| one   | two   | three | four  |',
'| Fee   | Fie   | Foe   | Fum   |',
].join(newlineMarker);

@DerekNonGeneric DerekNonGeneric changed the title 📖🐞 usage instructions are wrong 📖 usage instructions are wrong Mar 17, 2022
@DerekNonGeneric DerekNonGeneric added this to the Version 2.0 milestone Aug 17, 2022
@DerekNonGeneric DerekNonGeneric self-assigned this Aug 17, 2022
@DerekNonGeneric DerekNonGeneric changed the title 📖 usage instructions are wrong 📖 usage instructions are inconsistent Dec 10, 2022
@DerekNonGeneric
Copy link
Member Author

We should either use obj or object and tbl or table consistently throughout the usage examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant