Skip to content

Commit d3fd3c3

Browse files
committed
re-exporting http-status-toolkit package part removed
1 parent d1e21ce commit d3fd3c3

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![npm version](https://img.shields.io/npm/v/express-error-toolkit)](https://www.npmjs.com/package/express-error-toolkit)
44
![typescript](https://badgen.net/badge/icon/typescript?icon=typescript&label)
55
[![license](https://img.shields.io/npm/l/express-error-toolkit)](https://github.com/dev-rashedin/express-error-toolkit/blob/main/LICENSE)
6-
[![downloads](https://img.shields.io/npm/dm/http-status-toolkit)](https://www.npmjs.com/package/http-status-toolkit)
6+
[![downloads](https://img.shields.io/npm/dm/express-error-toolkit)](https://www.npmjs.com/package/express-error-toolkit)
77
![minified](https://badgen.net/bundlephobia/min/express-error-toolkit)
88
![minified gzip](https://badgen.net/bundlephobia/minzip/express-error-toolkit)
99

@@ -20,7 +20,6 @@ It provides:
2020
- An `asyncHandler` utility to handle async errors without boilerplate
2121
- A `httpError()` factory function to create custom error instances easily
2222
- `isCustomAPIError()` type guard for safe error type checks
23-
- Re-exported utilities from [`http-status-toolkit`](https://www.npmjs.com/package/http-status-toolkit) — no need to install it separately
2423

2524
---
2625

@@ -33,7 +32,6 @@ It provides:
3332
- ✅ Factory method for generating custom errors
3433
- ✅ Type guard for runtime error checking
3534
- ✅ Out-of-the-box support for both CJS and ESM
36-
- ✅ Includes `http-status-toolkit` exports (like `StatusCodes`, `getStatusMessage`)
3735

3836
---
3937

@@ -225,17 +223,6 @@ if (isCustomAPIError(err)) {
225223

226224
---
227225

228-
### 9. **Bonus**: Use status codes directly (re-exported from http-status-toolkit)
229-
230-
```ts
231-
import { StatusCodes, getStatusMessage } from 'express-error-toolkit';
232-
233-
res.status(StatusCodes.BAD_REQUEST).json({
234-
message: getStatusMessage(StatusCodes.BAD_REQUEST),
235-
});
236-
```
237-
238-
---
239226

240227
## 🔧 Custom Error Classes Available
241228

@@ -290,7 +277,7 @@ MIT © [Rashedin Islam](https://www.rashedin.dev)
290277

291278
## 🙌 Acknowledgements
292279

293-
This project includes and re-exports [`http-status-toolkit`](https://www.npmjs.com/package/http-status-toolkit), also created by me.
280+
This project includes [`http-status-toolkit`](https://www.npmjs.com/package/http-status-toolkit), also created by me.
294281

295282

296283
## Contributions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-error-toolkit",
3-
"version": "1.1.2",
3+
"version": "1.2.0",
44
"description": "A lightweight and developer-friendly toolkit for robust error handling in Express.js applications.\nIncludes ready-to-use custom error classes, an async route error handler wrapper, a global error handler middleware, and a convenient 'not found' route handler.\nDesigned to simplify error management, reduce boilerplate, and improve app reliability — all with TypeScript support and easy integration.",
55
"author": "Rashedin Islam <[email protected]>",
66
"license": "MIT",

src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ export { asyncHandler } from './async-handler'
1515
export { notFoundHandler } from './not-found-handler'
1616
export { isCustomAPIError } from './checking-custom-api-error'
1717
export { globalErrorHandler, setErrorOptions } from './global-error-handler';
18-
19-
20-
export { StatusCodes, getStatusMessage } from 'http-status-toolkit'

0 commit comments

Comments
 (0)