1 |
- {"ast":null,"code":"var $ = require('../internals/export');\n\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar fails = require('../internals/fails');\n\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n var prev = string.charAt(offset - 1);\n var next = string.charAt(offset + 1);\n\n if (low.test(match) && !hi.test(next) || hi.test(match) && !low.test(prev)) {\n return '\\\\u' + match.charCodeAt(0).toString(16);\n }\n\n return match;\n};\n\nvar FORCED = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"' || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify) {\n // `JSON.stringify` method\n // https://tc39.es/ecma262/#sec-json.stringify\n // https://github.com/tc39/proposal-well-formed-stringify\n $({\n target: 'JSON',\n stat: true,\n forced: FORCED\n }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var result = $stringify.apply(null, arguments);\n return typeof result == 'string' ? result.replace(re, fix) : result;\n }\n });\n}","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/core-js-pure/modules/es.json.stringify.js"],"names":["$","require","getBuiltIn","fails","$stringify","re","low","hi","fix","match","offset","string","prev","charAt","next","test","charCodeAt","toString","FORCED","target","stat","forced","stringify","it","replacer","space","result","apply","arguments","replace"],"mappings":"AAAA,IAAIA,CAAC,GAAGC,OAAO,CAAC,qBAAD,CAAf;;AACA,IAAIC,UAAU,GAAGD,OAAO,CAAC,2BAAD,CAAxB;;AACA,IAAIE,KAAK,GAAGF,OAAO,CAAC,oBAAD,CAAnB;;AAEA,IAAIG,UAAU,GAAGF,UAAU,CAAC,MAAD,EAAS,WAAT,CAA3B;AACA,IAAIG,EAAE,GAAG,kBAAT;AACA,IAAIC,GAAG,GAAG,mBA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D;AACD;AAL+C,GAAjD,CAAD;AAOD","sourcesContent":["var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar fails = require('../internals/fails');\n\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n var prev = string.charAt(offset - 1);\n var next = string.charAt(offset + 1);\n if ((low.test(match) && !hi.test(next)) || (hi.test(match) && !low.test(prev))) {\n return '\\\\u' + match.charCodeAt(0).toString(16);\n } return match;\n};\n\nvar FORCED = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify) {\n // `JSON.stringify` method\n // https://tc39.es/ecma262/#sec-json.stringify\n // https://github.com/tc39/proposal-well-formed-stringify\n $({ target: 'JSON', stat: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var result = $stringify.apply(null, arguments);\n return typeof result == 'string' ? result.replace(re, fix) : result;\n }\n });\n}\n"]},"metadata":{},"sourceType":"script"}
|