npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

octopus-express

v1.0.1

Published

Extend response for used method according HTTP Status Code.

Readme

Welcome to octopus-express 👋

Version Documentation Maintenance Twitter: jsdotx3

Extend response for used method according HTTP Status Code.

🏠 Homepage

Install

npm install octopus-express --save

Usage

After install, in your app.js can added this middleware before all routes.

const octopus = require('octopus-express');
app.use(octopus());

Octupus Express has multiple utils for object response of Express, for example, previously you programmer this:

res.status(400).json({error: 'Message')}

Now, with Octupus Express, your code is beatiful and simple.

res.badRequest('Message');

Example Methods

  • 200: res.ok('message')
  • 400: res.badRequest('message')
  • 401: res.unauthorized('message')

List Http Status Availables

| HTTP Status | Method | Function | |:---------:|:------:|:--------:| | 100 | Continue | continue | | 101 | Switching Protocols | switchingProtocols | | 102 | Processing | processing | | 103 | Early Hints | earlyHints | | 200 | OK | ok | | 201 | Created | created | | 202 | Accepted | accepted | | 203 | Non-Authoritative Information | nonAuthoritativeInformation | | 204 | No Content | noContent | | 205 | Reset Content | resetContent | | 206 | Partial Content | partialContent | | 207 | Multi-Status | multiStatus | | 208 | Already Reported | alreadyReported | | 226 | IM Used | imUsed | | 300 | Multiple Choices | multipleChoices | | 301 | Moved Permanently | movedPermanently | | 302 | Found | found | | 303 | See Other | seeOther | | 304 | Not Modified | notModified | | 305 | Use Proxy | useProxy | | 307 | Temporary Redirect | temporaryRedirect | | 308 | Permanent Redirect | permanentRedirect | | 400 | Bad Request | badRequest | | 401 | Unauthorized | unauthorized | | 402 | Payment Required | paymentRequired | | 403 | Forbidden | forbidden | | 404 | Not Found | notFound | | 405 | Method Not Allowed | methodNotAllowed | | 406 | Not Acceptable | notAcceptable | | 407 | Proxy Authentication Required | proxyAuthenticationRequired | | 408 | Request Timeout | requestTimeout | | 409 | Conflict | conflict | | 410 | Gone | gone | | 411 | Length Required | lengthRequired | | 412 | Precondition Failed | preconditionFailed | | 413 | Payload Too Large | payloadTooLarge | | 414 | URI Too Long | uriTooLong | | 415 | Unsupported Media Type | unsupportedMediaType | | 416 | Range Not Satisfiable | rangeNotSatisfiable | | 417 | Expectation Failed | expectationFailed | | 418 | I'm a Teapot | iMATeapot | | 421 | Misdirected Request | misdirectedRequest | | 422 | Unprocessable Entity | unprocessableEntity | | 423 | Locked | locked | | 424 | Failed Dependency | failedDependency | | 425 | Unordered Collection | unorderedCollection | | 426 | Upgrade Required | upgradeRequired | | 428 | Precondition Required | preconditionRequired | | 429 | Too Many Requests | tooManyRequests | | 431 | Request Header Fields Too Large | requestHeaderFieldsTooLarge | | 451 | Unavailable For Legal Reasons | unavailableForLegalReasons | | 500 | Internal Server Error | internalServerError | | 501 | Not Implemented | notImplemented | | 502 | Bad Gateway | badGateway | | 503 | Service Unavailable | serviceUnavailable | | 504 | Gateway Timeout | gatewayTimeout | | 505 | HTTP Version Not Supported | httpVersionNotSupported | | 506 | Variant Also Negotiates | variantAlsoNegotiates | | 507 | Insufficient Storage | insufficientStorage | | 508 | Loop Detected | loopDetected | | 509 | Bandwidth Limit Exceeded | bandwidthLimitExceeded | | 510 | Not Extended | notExtended | | 511 | Network Authentication Required | networkAuthenticationRequired |

Author

👤 Jose Nuñez A. [email protected]

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2019 Jose Nuñez A. [email protected].

This project is MIT licensed.