Title: Bug in Data.String.Unsafe.char · Issue #36 · purescript/purescript-strings · GitHub
Open Graph Title: Bug in Data.String.Unsafe.char · Issue #36 · purescript/purescript-strings
X Title: Bug in Data.String.Unsafe.char · Issue #36 · purescript/purescript-strings
Description: The js code for Data.String.Unsafe.char looks like this: exports.char = function (s) { if (s.length !== 1) return s.charAt(0); throw new Error("Data.String.Unsafe.char: Expected string of length 1."); }; I'm pretty sure that line on line...
Open Graph Description: The js code for Data.String.Unsafe.char looks like this: exports.char = function (s) { if (s.length !== 1) return s.charAt(0); throw new Error("Data.String.Unsafe.char: Expected string of length 1....
X Description: The js code for Data.String.Unsafe.char looks like this: exports.char = function (s) { if (s.length !== 1) return s.charAt(0); throw new Error("Data.String.Unsafe.char: Expected string of leng...
Opengraph URL: https://github.com/purescript/purescript-strings/issues/36
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug in Data.String.Unsafe.char","articleBody":"The js code for [Data.String.Unsafe.char](https://github.com/purescript/purescript-strings/blob/710382eb136b7587062f6ee2e3c8e616018ecabd/src/Data/String/Unsafe.js#L21) looks like this:\n\n``` javascript\nexports.char = function (s) {\n if (s.length !== 1) return s.charAt(0);\n throw new Error(\"Data.String.Unsafe.char: Expected string of length 1.\");\n};\n```\n\nI'm pretty sure that line on line 21 that `!==` is meant to be an `===`; atm the function's bugging out for good inputs & vice versa. Should be:\n\n``` javascript\nif (s.length === 1) return s.charAt(0);\n```\n","author":{"url":"https://github.com/stkb","@type":"Person","name":"stkb"},"datePublished":"2015-07-06T17:38:55Z","url":"https://github.com/purescript/purescript-strings/issues/36"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:08fe55bb-3bb6-27ed-f9d7-a2baf1ba55ae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D320:33444D:8C083:BF0E5:6B00B93C |
| html-safe-nonce | f25732d8c7642d5d90b349420c7104998d0e961d270614d7582ffc958e27e590 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzIwOjMzNDQ0RDo4QzA4MzpCRjBFNTo2QjAwQjkzQyIsInZpc2l0b3JfaWQiOiI0NzcwMzA5NjgwODM4Nzg1MzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | db6b0a027d2b5ed8f9580da73b38fe1a7c932d44fd69e6c33ac05843abf3a910 |
| hovercard-subject-tag | issue:93334298 |
| 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/purescript/purescript-strings/36/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf568f2c5177c00d4507077f8b5599f5c5a83caea5d13e2dbe616bb303e30eeb/purescript/purescript-strings/issues/36 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf568f2c5177c00d4507077f8b5599f5c5a83caea5d13e2dbe616bb303e30eeb/purescript/purescript-strings/issues/36 |
| og:image:alt | The js code for Data.String.Unsafe.char looks like this: exports.char = function (s) { if (s.length !== 1) return s.charAt(0); throw new Error("Data.String.Unsafe.char: Expected string of length 1.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stkb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d07c25977adfc5ff6acb0a962a9bc168c07afbda6fef765f9761c350c2ae4a2 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript/purescript-strings git https://github.com/purescript/purescript-strings.git |
| octolytics-dimension-user_id | 6556677 |
| octolytics-dimension-user_login | purescript |
| octolytics-dimension-repository_id | 17881174 |
| octolytics-dimension-repository_nwo | purescript/purescript-strings |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17881174 |
| octolytics-dimension-repository_network_root_nwo | purescript/purescript-strings |
| 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 | 5429cbfc6aca8c7b9a086a3c8f47400346f38cc9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width