Gathering detailed insights and metrics for @tshttp/status
Gathering detailed insights and metrics for @tshttp/status
Gathering detailed insights and metrics for @tshttp/status
Gathering detailed insights and metrics for @tshttp/status
npm install @tshttp/status
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7 Stars
31 Commits
1 Forks
2 Watchers
2 Branches
1 Contributors
Updated on Feb 01, 2024
Latest Version
2.0.0
Package Id
@tshttp/status@2.0.0
Unpacked Size
62.40 kB
Size
9.98 kB
File Count
8
NPM Version
lerna/3.22.1/node@v12.19.1+x64 (win32)
Node Version
12.19.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
@tshttp/status
🎰Ultra typed, over documented, and neatly organised HTTP status enums, to use for a great developper experience.
1yarn add @tshttp/status 2npm install @tshttp/status
1import { Status } from '@tshttp/status' 2 3res.sendStatus(Status.Created)
Status
enum is composed of the following exported enums:
InformationStatus
for 1xx responses.SuccessStatus
for 2xx responses.RedirectionStatus
for 3xx responses.ErrorStatus
for 4xx and 5xx responses.1import { ErrorStatus } from '@tshttp/status' 2import { HttpError } from '@tshttp/error' 3 4throw HttpError(ErrorStatus.Forbidden)
These enums are actually object litterals with a const
assertion.`
When use as a type, each category is a union of corresponding status codes.
1import { RedirectionStatus } from '@tshttp/status' 2 3function redirect(status: RedirectionStatus, url: string) { 4 // ... 5}
A simple method called reason
transforms a status code into its human readable reason phrase :
1import { reason, ErrorStatus } from '@tshttp/status' 2 3reason(200) // "OK" 4reason(301) // "Moved Permanently" 5reason(404) // "Not Found" 6reason(ErrorStatus.ImATeapot) // "I'm a teapot"
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
65 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More