0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/idna.js
ZYSzys 04c839bd8c lib: convert legacy process.binding to internalBinding
PR-URL: https://github.com/nodejs/node/pull/26095
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-18 07:21:48 +01:00

10 lines
264 B
JavaScript

'use strict';
if (internalBinding('config').hasIntl) {
const { toASCII, toUnicode } = internalBinding('icu');
module.exports = { toASCII, toUnicode };
} else {
const { toASCII, toUnicode } = require('punycode');
module.exports = { toASCII, toUnicode };
}