jsdom / tr46

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing.
MIT License
32 stars 14 forks source link

Error on iPad Air 2, iOS 8 in safari #20

Closed vlysytsia closed 5 years ago

vlysytsia commented 5 years ago

Get an error on iPad Air 2 iOS 8 in safari browser Unexpected keyword 'const'. Const declarations are not supported in strict mode.

    "../../node_modules/tr46/index.js": /*!***************************************************************!*\
  !*** /PATH/node_modules/tr46/index.js ***!
  \***************************************************************/
    /*! no static exports found */
    /***/
    (function(module, exports, __webpack_require__) {

        "use strict";

        const punycode = __webpack_require__(/*! punycode */
        "../../node_modules/node-libs-browser/node_modules/punycode/punycode.js");
        const regexes = __webpack_require__(/*! ./lib/regexes.js */
        "../../node_modules/tr46/lib/regexes.js");
        const mappingTable = __webpack_require__(/*! ./lib/mappingTable.json */
        "../../node_modules/tr46/lib/mappingTable.json");

        function containsNonASCII(str) {
            return /[^\x00-\x7F]/.test(str);
        }
Sebmaster commented 5 years ago

You'll need to transpile the code to work with older browsers.

This module strives mostly for correctness and node-compat. We don't test on browsers.