Title: Q: Is there interest in adding more assertion libraries? · Issue #22 · unassert-js/unassert · GitHub
Open Graph Title: Q: Is there interest in adding more assertion libraries? · Issue #22 · unassert-js/unassert
X Title: Q: Is there interest in adding more assertion libraries? · Issue #22 · unassert-js/unassert
Description: Background I’m using assertions in micromark. It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about. I’m using an export map to differentiate between code that d...
Open Graph Description: Background I’m using assertions in micromark. It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about. I’m using an export ...
X Description: Background I’m using assertions in micromark. It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about. I’m using an export ...
Opengraph URL: https://github.com/unassert-js/unassert/issues/22
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Q: Is there interest in adding more assertion libraries?","articleBody":"### Background\r\n\r\nI’m using assertions in [micromark](https://github.com/micromark/micromark). It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about.\r\n\r\nI’m using an export map to differentiate between code that does have assertions, and code that doesn’t: https://github.com/micromark/micromark/blob/a03a08ce677b91a2960be2f4fcaacd64b3b8ec18/packages/micromark/package.json#L55-L58. Most people will get unasserted files. With `node --conditions development`, code with assertions is loaded. This is very useful when making plugins.\r\n\r\n### Problem\r\n\r\n- However, some browser bundlers (Vite, webpack), don’t load `assert` normally. While users can configure their bundlers, micromark is often used through many other packages, and I’d rather have everything just work by default\r\n- `power-assert` contains *tons* of code and also doesn’t bundle well in at least webpack.\r\n\r\n### Solution\r\n\r\n- I could either create a new, small, typed `assert` library, or perhaps use something like [`uvu/assert`](https://github.com/lukeed/uvu/blob/master/src/assert.js)\r\n- Is `unassert` interested in adding support for more libraries, and if so, what are the requirements?\r\n\r\nI can do the work on adding one.\r\n\r\n/cc @twada\r\n\r\nRelated-to: micromark/micromark#87, micromark/micromark#95.","author":{"url":"https://github.com/wooorm","@type":"Person","name":"wooorm"},"datePublished":"2021-10-08T08:08:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/22/unassert/issues/22"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:779a0114-7f00-9ad5-509f-aacedd98b81e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9600:178E2:13A3293:1A274C8:69706152 |
| html-safe-nonce | 9d08558ae884fc03950ccb3644365b47700fd8c3b820b746e39d2641c36d454b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjAwOjE3OEUyOjEzQTMyOTM6MUEyNzRDODo2OTcwNjE1MiIsInZpc2l0b3JfaWQiOiIxMDk3NDYyOTY0NTA0NTE4OTk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | aab6dd180b48fb46e7a4a0356d6f37dd7facfc570b9fb5b891a1aabea4722f49 |
| hovercard-subject-tag | issue:1020817409 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/unassert-js/unassert/22/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d271809f8f830e18f6c34c62762e83b9c64e2da16f6e0c5c380a30903631f2f6/unassert-js/unassert/issues/22 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d271809f8f830e18f6c34c62762e83b9c64e2da16f6e0c5c380a30903631f2f6/unassert-js/unassert/issues/22 |
| og:image:alt | Background I’m using assertions in micromark. It’s a complex parser using state machines. It’s also extendable with plugins. So assertions makes it much easier to reason about. I’m using an export ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wooorm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/unassert-js/unassert git https://github.com/unassert-js/unassert.git |
| octolytics-dimension-user_id | 24517653 |
| octolytics-dimension-user_login | unassert-js |
| octolytics-dimension-repository_id | 36333911 |
| octolytics-dimension-repository_nwo | unassert-js/unassert |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36333911 |
| octolytics-dimension-repository_network_root_nwo | unassert-js/unassert |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width