{"id":26076868,"url":"https://github.com/purescript-contrib/purescript-js-uri","last_synced_at":"2025-10-27T15:34:08.109Z","repository":{"id":41828119,"uuid":"321512904","full_name":"purescript-contrib/purescript-js-uri","owner":"purescript-contrib","description":"URI encoding and decoding functions","archived":false,"fork":false,"pushed_at":"2022-08-16T00:00:23.000Z","size":25,"stargazers_count":4,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-09T02:36:36.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purescript-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-15T00:54:15.000Z","updated_at":"2023-07-25T14:41:41.000Z","dependencies_parsed_at":"2022-08-11T18:40:52.804Z","dependency_job_id":null,"html_url":"https://github.com/purescript-contrib/purescript-js-uri","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/purescript-contrib/purescript-js-uri","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-js-uri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-js-uri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-js-uri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-js-uri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purescript-contrib","download_url":"https://codeload.github.com/purescript-contrib/purescript-js-uri/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-js-uri/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002621,"owners_count":26083425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T02:36:38.714Z","updated_at":"2025-10-10T03:36:27.561Z","avatar_url":"https://github.com/purescript-contrib.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS URI\n\n[![CI](https://github.com/purescript-contrib/purescript-js-uri/workflows/CI/badge.svg?branch=main)](https://github.com/purescript-contrib/purescript-js-uri/actions?query=workflow%3ACI+branch%3Amain)\n[![Release](https://img.shields.io/github/release/purescript-contrib/purescript-js-uri.svg)](https://github.com/purescript-contrib/purescript-js-uri/releases)\n[![Pursuit](https://pursuit.purescript.org/packages/purescript-js-uri/badge)](https://pursuit.purescript.org/packages/purescript-js-uri)\n\nURI encoding and decoding functions according to [RFC 3986](https://tools.ietf.org/html/rfc3986), implemented on top of JavaScript's builtin `encodeURIComponent` and `decodeURIComponent`. This library also contains support for encoding and decoding according to `application/x-www-form-urlencoded`.\n\n## Installation\n\nInstall `js-uri` with [Spago](https://github.com/purescript/spago):\n\n```sh\nspago install js-uri\n```\n\n## Quick start\n\nThis library provides functions for encoding and decoding URIs and additional functions that match `application/x-www-form-urlencoded`. To encode or decode a URI according to RFC3896:\n\n```purs\nimport JSURI (encodeURIComponent, decodeURIComponent)\n\n\u003e encodeURIComponent \"https://purescript.org\"\nJust \"https%3A%2F%2Fpurescript.org\"\n\n\u003e encodeURIComponent \"abc ABC\"\nJust \"abc%20ABC\"\n\n\u003e decodeURIComponent \"https%3A%2F%2Fpurescript.org\" == Just \"https://purescript.org\"\n\u003e decodeURIComponent \"https%3A%2F%2Fpurescript.org?search+query\" == Just \"https://purescript.org?search+query\"\n```\n\nTo use `form-urlencoding` instead, which uses `+` for spaces instead of `%20`:\n\n```purs\nimport JSURI (encodeFormURLComponent, decodeFormURLComponent)\n\n\u003e encodeFormURLComponent \"abc ABC\" == Just \"abc+ABC\"\n\u003e decodeFormURLComponent \"https%3A%2F%2Fpurescript.org?search+query\" == Just \"https://purescript.org?search query\"\n```\n\n## Documentation\n\n`js-uri` documentation is stored in a few places:\n\n1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-js-uri).\n2. Usage examples can be found in [the test suite](./test).\n\nIf you get stuck, there are several ways to get help:\n\n- [Open an issue](https://github.com/purescript-contrib/purescript-js-uri/issues) if you have encountered a bug or problem.\n- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.\n\n## Contributing\n\nYou can contribute to `js-uri` in several ways:\n\n1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-js-uri/issues). We'll do our best to work with you to resolve or answer it.\n\n2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.\n\n3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fpurescript-js-uri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurescript-contrib%2Fpurescript-js-uri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fpurescript-js-uri/lists"}