https://github.com/gajus/punycode-url
Encodes/ decodes URLs to punycode/ unicode.
https://github.com/gajus/punycode-url
decode encode punycode unicode url
Last synced: 3 months ago
JSON representation
Encodes/ decodes URLs to punycode/ unicode.
- Host: GitHub
- URL: https://github.com/gajus/punycode-url
- Owner: gajus
- License: other
- Created: 2019-09-06T17:47:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-06T17:50:54.000Z (almost 6 years ago)
- Last Synced: 2025-01-08T12:50:12.231Z (6 months ago)
- Topics: decode, encode, punycode, unicode, url
- Language: JavaScript
- Size: 3.91 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# punycode-url
[](https://travis-ci.org/gajus/punycode-url)
[](https://coveralls.io/github/gajus/punycode-url)
[](https://www.npmjs.org/package/punycode-url)
[](https://github.com/gajus/canonical)
[](https://twitter.com/kuizinas)Encodes/ decodes URLs to punycode/ unicode.
## Usage
```js
import punycodeUrl from 'punycode-url';punycodeUrl.toASCII('//gájùs.gájùs.com');
// '//xn--gjs-ela5j.xn--gjs-ela5j.com'punycodeUrl.toUnicode('//xn--gjs-ela5j.xn--gjs-ela5j.com');
// '//gájùs.gájùs.com'```