Blame view

lib/jsdom/living/helpers/json.js 190 Bytes
858f2bdf5   Boyan Georgiev   fixes
1
2
3
4
5
6
7
8
  "use strict";
  
  // https://infra.spec.whatwg.org/#parse-json-from-bytes
  exports.parseJSONFromBytes = bytes => {
    const jsonText = bytes.toString("utf-8");
  
    return JSON.parse(jsonText);
  };