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

response-objects

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

response-objects - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

8

index.js

@@ -45,3 +45,7 @@ const status = require("statuses");

function getName (code) {
return status[code].replace(/[\s+-]/g, "");
const name = status[code];
if (!name) {
throw new Error(`Unable to find status for ${code}`);
}
return name.replace(/[\s+-]/g, "");
}

@@ -80,3 +84,3 @@

let bodyCreator = (code, body /*, headers */) => body != null ? body : status[code];
let bodyCreator = (code, body /*, headers */) => body != null ? body : (status[code] || `Unknown status for ${code}`);
module.exports.setBodyCreator = f => bodyCreator = f;
{
"name": "response-objects",
"version": "0.10.0",
"version": "0.10.1",
"description": "simple value objects representing HTTP responses",

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

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