{"size": 1085, "ext": "js", "max_stars_repo_path": "web/frontend/node_modules/core-js/modules/es.json.stringify.js", "max_stars_repo_name": "atesbilgin/ENELPI---Soru-Cevap-Sistemi", "max_stars_repo_stars_event_min_datetime": "2015-06-05T05:06:05.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T07:08:56.000Z", "max_issues_repo_path": "web/frontend/node_modules/core-js/modules/es.json.stringify.js", "max_issues_repo_name": "atesbilgin/ENELPI---Soru-Cevap-Sistemi", "max_issues_repo_issues_event_min_datetime": "2016-10-19T16:05:24.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-17T21:43:58.000Z", "max_forks_repo_path": "web/frontend/node_modules/core-js/modules/es.json.stringify.js", "max_forks_repo_name": "atesbilgin/ENELPI---Soru-Cevap-Sistemi", "max_forks_repo_forks_event_min_datetime": "2020-09-24T23:59:38.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-31T13:24:30.000Z"}
{"max_stars_count": 2389, "max_issues_count": 349, "max_forks_count": 481, "avg_line_length": 32.8787878788, "max_line_length": 83, "alphanum_fraction": 0.6156682028}
var $ = require('../internals/export');
var getBuiltIn = require('../internals/get-built-in');
var fails = require('../internals/fails');

var $stringify = getBuiltIn('JSON', 'stringify');
var re = /[\uD800-\uDFFF]/g;
var low = /^[\uD800-\uDBFF]$/;
var hi = /^[\uDC00-\uDFFF]$/;

var fix = function (match, offset, string) {
  var prev = string.charAt(offset - 1);
  var next = string.charAt(offset + 1);
  if ((low.test(match) && !hi.test(next)) || (hi.test(match) && !low.test(prev))) {
    return '\\u' + match.charCodeAt(0).toString(16);
  } return match;
};

var FORCED = fails(function () {
  return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
    || $stringify('\uDEAD') !== '"\\udead"';
});

if ($stringify) {
  // https://github.com/tc39/proposal-well-formed-stringify
  $({ target: 'JSON', stat: true, forced: FORCED }, {
    // eslint-disable-next-line no-unused-vars
    stringify: function stringify(it, replacer, space) {
      var result = $stringify.apply(null, arguments);
      return typeof result == 'string' ? result.replace(re, fix) : result;
    }
  });
}
