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

@wahlemedia/http-status-codes

v1.1.0

Published

A TypeScript class, that returns http status codes

Downloads

4

Readme

HTTP Status codes

tests GitHub Workflow Status GitHub package.json version

A TypeScript implementation of JustSteveKing's http-status-code PHP package.

It is a simple class, that return status codes for http responses.

Installation

Using npm

npm install @wahlemedia/http-status-codes

Than your are good to go. You can use it as you need within your project.

Usage


import Http from '@wahlemedia/HttpStatusCodes'

Http.CONTINUE; // returns 100
Http.SWITCHING_PROTOCOLS; // returns 101
Http.PROCESSING; // returns 102
Http.EARLY_HINTS; // returns 103

Http.OK; // returns 200
Http.CREATED; // returns 201
Http.ACCEPTED; // returns 202
Http.NON_AUTHORITATIVE_INFORMATION; // returns 203
Http.NO_CONTENT; // returns 204
Http.RESET_CONTENT; // returns 205
Http.PARTIAL_CONTENT; // returns 206
Http.MULTI_STATUS; // returns 207
Http.ALREADY_REPORTED; // returns 208
Http.THIS_IS_FINE; // returns 218
Http.IM_USED; // returns 226

Http.MULTIPLE_CHOICES; // returns 300
Http.MOVED_PERMANENTLY; // returns 301
Http.FOUND; // return 302
Http.SEE_OTHER; // return 303
Http.NOT_MODIFIED; // return 304
Http.USE_PROXY; // returns 305
Http.TEMPORARY_REDIRECT; // returns 307
Http.PERMANENT_REDIRECT; // returns 308

Http.BAD_REQUEST; // returns 400
Http.UNAUTHORIZED; // returns 401
Http.PAYMENT_REQUIRED; // return 402
Http.FORBIDDEN; // returns 403
Http.NOT_FOUND; // returns 404
Http.METHOD_NOT_ALLOWED; // returns 405
Http.NOT_ACCEPTABLE; // returns 406
Http.PROXY_AUTHENTICATION_REQUIRED; // returns 407
Http.REQUEST_TIMEOUT; // returns 408
Http.CONFLICT; // returns 409
Http.GONE; // returns 410
Http.LENGTH_REQUIRED; // returns 411
Http.PRECONDITION_FAILED; // returns 412
Http.PAYLOAD_TOO_LARGE; // returns 413
Http.URI_TOO_LONG; // returns 414
Http.UNSUPPORTED_MEDIA_TYPE; // returns 415
Http.RANGE_NOT_SATISFIABLE; // returns 416
Http.EXPECTATION_FAILED; // returns 417
Http.I_AM_A_TEAPOT; // returns 418
Http.PAGE_EXPIRED; // returns 419
Http.MISDIRECTED_REQUEST; // returns 421
Http.UNPROCESSABLE_ENTITY; // returns 422
Http.LOCKED; // returns 423
Http.FAILED_DEPENDENCY; // returns 424
Http.TOO_EARLY; // returns 425
Http.UPGRADE_REQUIRED; // returns 426
Http.PRECONDITION_REQUIRED; // returns 428
Http.TOO_MANY_REQUESTS; // returns 429
Http.REQUEST_HEADER_FIELDS_TOO_LARGE; // returns 431
Http.LOGIN_TIME_OUT; // returns 440
Http.NO_RESPONSE; // returns 444
Http.RETRY_WITH; // returns 449
Http.BLOCKED_BY_WINDOWS_PARENTAL_CONTROL; // returns 450
Http.UNAVAILABLE_FOR_LEGAL_REASONS; // returns 451
Http.CLIENT_CLOSED_THE_CONNECTION; // returns 460
Http.X_FORWARDED_FOR_TOO_LARGE; // returns 463
Http.REQUEST_HEADER_TOO_LARGE; // returns 494;
Http.SSL_CERTIFICATE_ERROR; // returns 495
Http.SSL_CERTIFICATE_REQUIRED; // returns 496
Http.HTTP_REQUEST_SENT_TO_HTTPS_PORT; // returns 497
Http.INVALID_TOKEN; // returns 498
Http.TOKEN_REQUIRED; // returns 499

Http.INTERNAL_SERVER_ERROR; // returns 500
Http.NOT_IMPLEMENTED; // returns 501
Http.BAD_GATEWAY; // returns 502
Http.SERVICE_UNAVAILABLE; // returns 503
Http.GATEWAY_TIMEOUT; // returns 504
Http.HTTP_VERSION_NOT_SUPPORTED; // returns 505
Http.VARIANT_ALSO_NEGOTIATES; // returns 506
Http.INSUFFICIENT_STORAGE; // returns 507
Http.LOOP_DETECTED; // returns 508
Http.BANDWIDTH_LIMIT_EXCEEDED; // returns 509
Http.NOT_EXTENDED; // returns 510
Http.NETWORK_AUTHENTICATION_REQUIRED; // returns 511
Http.WEB_SERVER_RETURNED_AN_UNKNOWN_ERROR; // returns 520
Http.WEB_SERVER_IS_DOWN; // returns 521
Http.CONNECTION_TIMED_OUT; // returns 522
Http.ORIGIN_IS_UNREACHABLE; // returns 523
Http.A_TIMEOUT_OCCURRED; // returns 524
Http.SSL_HANDSHAKE_FAILED; // returns 525
Http.INVALID_SSL_CERTIFICATE; // returns 526
Http.RAILGUN_ERROR; // returns 527
Http.SITE_IS_OVERLOADED; // returns 529
Http.SITE_IS_FROZEN; // returns 530
Http.NETWORK_READ_TIMEOUT_ERROR; // returns 598

Test

npm run test