https://github.com/leodido/go-encodeuricomponent
Replicates the JavaScript encodeURIcomponent in Go
https://github.com/leodido/go-encodeuricomponent
encode encodeuricomponent golang javascript nodejs uri url utf-8
Last synced: 26 days ago
JSON representation
Replicates the JavaScript encodeURIcomponent in Go
- Host: GitHub
- URL: https://github.com/leodido/go-encodeuricomponent
- Owner: leodido
- License: apache-2.0
- Created: 2023-02-06T15:19:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T15:49:19.000Z (over 3 years ago)
- Last Synced: 2025-02-11T10:59:41.601Z (over 1 year ago)
- Topics: encode, encodeuricomponent, golang, javascript, nodejs, uri, url, utf-8
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-encodeuricomponent
> A library that replicates the behavior of the `encodeURIComponent` JavaScript function
##### Notice
The current implementation doesn't detect lead and trail surrogates.
The Javascript `encodeURIComponent` returns an error when one attempts to encode a lone low/high surrogate.
This library doesn't, at the moment. Supporting this feature is a very valuable way to start contributing!
Get to know more by reading the [mdn web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#encoding_a_lone_high_surrogate_throws).