Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uasi/inko-url_search_params
A URLSearchParams implementation.
https://github.com/uasi/inko-url_search_params
Last synced: 17 days ago
JSON representation
A URLSearchParams implementation.
- Host: GitHub
- URL: https://github.com/uasi/inko-url_search_params
- Owner: uasi
- License: mpl-2.0
- Created: 2023-10-16T07:50:15.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-30T19:18:06.000Z (5 months ago)
- Last Synced: 2024-11-05T20:50:22.821Z (2 months ago)
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# inko-url_search_params
An implementation of [the `URLSearchParams` class](https://url.spec.whatwg.org/#interface-urlsearchparams) from the URL Standard in the Inko programming language.
## Examples
import url_search_params (UrlSearchParams)
let params = UrlSearchParams.from_string('a=A+A%26A&n=1&n=2')
params.get('a') # => Option.Some('A A&A')
params.get('x') # => Option.None
params.get_all('n') # => ['1', '2']
params.get_all('x') # => []# ---
let params = UrlSearchParams.new
params.set('a', 'will be overwritten')
params.set('a', 'A A&A')
params.append('n', '1')
params.append('n', '2')params.to_string # => 'a=A+A%26A&n=1&n=2'