Skip to content

docs: add examples of per-version validation#543

Merged
ctavan merged 1 commit intouuidjs:masterfrom
Mearman:version-validation-docs
Dec 8, 2020
Merged

docs: add examples of per-version validation#543
ctavan merged 1 commit intouuidjs:masterfrom
Mearman:version-validation-docs

Conversation

@Mearman
Copy link
Copy Markdown
Contributor

@Mearman Mearman commented Dec 7, 2020

Created in lieu of specific per-version validation methods as seen in #542

Might be something stupid I'm doing but for some reason, having the two aliased imports caused SyntaxError: Cannot use import statement outside a module

Copy link
Copy Markdown
Member

@ctavan ctavan left a comment

Choose a reason for hiding this comment

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

Apart from putting both imports into one statement (which is probably currently not supported by runmd) I really like this! Thank you 🙇‍♂️

Comment thread README.md

```javascript
import { version as uuidVersion } from 'uuid';
import { validate as uuidValidate } from 'uuid';
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 guess runmd stumbles when you put both imports into one line? Because we actually just hack our way around ESM

Copy link
Copy Markdown
Contributor Author

@Mearman Mearman Dec 7, 2020

Choose a reason for hiding this comment

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

Hahah yeah it wasn't happy about it at all.
Want me to submit it as an issue over on runmd?

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.

Want me to submit it as an issue over on runmd?

Yes, please. I'm aware of the issue but need to revisit it to see if there's a better solution than the one ctavan and I hacked in a while ago.

Copy link
Copy Markdown
Member

@broofa broofa left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants