| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3419b7a commit 6344997
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,7 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | - function importPunycode() { | ||
| 4 | - try { | ||
| 5 | - return process.binding('icu'); | ||
| 6 | - } catch (e) { | ||
| 7 | - return require('punycode'); | ||
| 8 | - } | ||
| 9 | - } | ||
| 10 | - | ||
| 11 | - const { toASCII } = importPunycode(); | ||
| 3 | + const { toASCII } = process.binding('config').hasIntl ? | ||
| 4 | + process.binding('icu') : require('punycode'); | ||
| 12 | 5 | ||
| 13 | 6 | exports.parse = urlParse; | |
| 14 | 7 | exports.resolve = urlResolve; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments