Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fus-ext

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fus-ext - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

7

changelog.md

@@ -0,1 +1,8 @@

v1.10.1
=======
2017-05-05T12:24:22Z
- `web` can parse UTF-16LE responses or responses with BOM in Node.js.
v1.10.0

@@ -2,0 +9,0 @@ =======

2

package.json
{
"name": "fus-ext",
"version": "1.10.0",
"version": "1.10.1",
"description": "FutureScript Extension",

@@ -5,0 +5,0 @@ "keywords": [

@@ -119,3 +119,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {

var arg_573300145710716007 = arguments;return (function () {
var response;return (function () {
var response, bodyString, contentType, contentEncodingMatches, encoding;return (function () {
try {

@@ -126,9 +126,37 @@ return (function () {

})() : (function () {
return responseBodyType === "text" ? (function () {
return data.toString();
})() : (function () {
return responseBodyType === "json" ? (function () {
return JSON.parse(data.toString());
})() : undefined;
})();
return ["text", "json"].indexOf(responseBodyType) >= 0 ? (function () {
bodyString = data[0] === 0xef && data[1] === 0xbb && data[2] === 0xbf ? (function () {
return data.toString(undefined, 3);
})() : (function () {
return data[0] === 0xff && data[1] === 0xfe ? (function () {
return data.toString("utf16le", 2);
})() : (function () {
return data[0] === 0xfe && data[1] === 0xff ? (function () {
return (0, _main.fail)();
})() : (function () {
contentType = rawResponse.headers["content-type"].toLowerCase();return ok_573300145710716007(contentType) ? (function () {
contentEncodingMatches = contentType.match(new RegExp(";\\s*charset=([^\\s;]+)\\s*(;|$)"));return ok_573300145710716007(contentEncodingMatches) ? (function () {
encoding = contentEncodingMatches[1];return encoding === "utf-8" ? (function () {
return data.toString();
})() : (function () {
return ["utf-16", "utf-16le"].indexOf(encoding) >= 0 ? (function () {
return data.toString("utf16le");
})() : (function () {
return (0, _main.fail)();
})();
})();
})() : (function () {
return data.toString();
})();
})() : (function () {
return data.toString();
})();
})();
})();
})();return responseBodyType === "text" ? (function () {
return bodyString;
})() : (function () {
return JSON.parse(bodyString);
})();
})() : undefined;
})() };return 200 <= response.statusCode && response.statusCode < 300 ? (function () {

@@ -135,0 +163,0 @@ return resolve(response);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc