diff options
| author | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
|---|---|---|
| committer | Priyansh <[email protected]> | 2020-12-22 17:50:12 +0530 |
| commit | 22dc033f4938d6a19e086a1cbd36ec5cade5eaab (patch) | |
| tree | 9feb963ccd5c1581e676e41004801abc67db3357 /node_modules/core-js/modules/es.json.stringify.js | |
| parent | e93da8b04da86773247aadb1cbb1912e4f4526b2 (diff) | |
| download | styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.tar.xz styx-22dc033f4938d6a19e086a1cbd36ec5cade5eaab.zip | |
Remove node_modules
Diffstat (limited to 'node_modules/core-js/modules/es.json.stringify.js')
| -rw-r--r-- | node_modules/core-js/modules/es.json.stringify.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/node_modules/core-js/modules/es.json.stringify.js b/node_modules/core-js/modules/es.json.stringify.js deleted file mode 100644 index 56ba89f..0000000 --- a/node_modules/core-js/modules/es.json.stringify.js +++ /dev/null @@ -1,32 +0,0 @@ -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; - } - }); -} |
