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

react-server-middleware-json-response

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-server-middleware-json-response - npm Package Compare versions

Comparing version 0.6.1 to 1.0.0-alpha.0

LICENSE

74

index.js

@@ -1,48 +0,44 @@

'use strict';
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports["default"] = void 0;
var _stringify = require('babel-runtime/core-js/json/stringify');
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _stringify2 = _interopRequireDefault(_stringify);
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var JsonResponseMiddleware =
/*#__PURE__*/
function () {
function JsonResponseMiddleware() {
(0, _classCallCheck2["default"])(this, JsonResponseMiddleware);
}
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var JsonResponseMiddleware = function () {
function JsonResponseMiddleware() {
(0, _classCallCheck3.default)(this, JsonResponseMiddleware);
}
(0, _createClass3.default)(JsonResponseMiddleware, [{
key: 'setConfigValues',
value: function setConfigValues() {
return { isRawResponse: true };
}
}, {
key: 'getContentType',
value: function getContentType() {
return 'application/json';
}
}, {
key: 'getResponseData',
value: function getResponseData(next) {
return next().then(function (data) {
return (0, _stringify2.default)(data);
});
}
}]);
return JsonResponseMiddleware;
(0, _createClass2["default"])(JsonResponseMiddleware, [{
key: "setConfigValues",
value: function setConfigValues() {
return {
isRawResponse: true
};
}
}, {
key: "getContentType",
value: function getContentType() {
return 'application/json';
}
}, {
key: "getResponseData",
value: function getResponseData(next) {
return next().then(function (data) {
return JSON.stringify(data);
});
}
}]);
return JsonResponseMiddleware;
}();
exports.default = JsonResponseMiddleware;
module.exports = exports['default'];
exports["default"] = JsonResponseMiddleware;
{
"name": "react-server-middleware-json-response",
"version": "0.6.1",
"version": "1.0.0-alpha.0",
"description": "JSON response middleware for React Server",

@@ -8,5 +8,5 @@ "main": "index.js",

"prepublish": "npm run build",
"build": "babel index.src.js --out-file index.js",
"build": "babel --root-mode upward index.src.js --out-file index.js",
"clean": "rimraf index.js",
"test": "eslint src"
"lint": "eslint index.src.js"
},

@@ -28,12 +28,8 @@ "repository": {

},
"devDependencies": {
"babel-plugin-react-server": "^1.0.0-alpha.0",
"babel-preset-react-server": "^1.0.0-alpha.0"
},
"homepage": "https://github.com/redfin/react-server#readme",
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-react-server": "^0.6.0",
"eslint": "^3.8.1",
"eslint-plugin-react": "^6.4.1",
"babel-eslint": "^7.0.0",
"rimraf": "^2.5.4"
}
"gitHead": "8fe9078c4c8d8638909805f55f278cb5958d3ff7"
}
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