diff options
Diffstat (limited to 'school/node_modules/jsdom/lib/jsdom/living/helpers/json.js')
-rw-r--r-- | school/node_modules/jsdom/lib/jsdom/living/helpers/json.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/school/node_modules/jsdom/lib/jsdom/living/helpers/json.js b/school/node_modules/jsdom/lib/jsdom/living/helpers/json.js deleted file mode 100644 index 6920bc2..0000000 --- a/school/node_modules/jsdom/lib/jsdom/living/helpers/json.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -// https://infra.spec.whatwg.org/#parse-json-from-bytes -exports.parseJSONFromBytes = bytes => { - // https://encoding.spec.whatwg.org/#utf-8-decode - if (bytes[0] === 0xEF && bytes[1] === 0xBB && bytes[2] === 0xBF) { - bytes = bytes.subarray(3); - } - const jsonText = bytes.toString("utf-8"); - - return JSON.parse(jsonText); -}; |