serialize-error
This also works if serialize-error is a sub-dependency that's not used directly, as long as the project ends up with a single physical copy of the package.
Official Documentation ↗v11.0.3. Check the official docs for the latest API surface.Installation
npm install serialize-errorpnpm add serialize-errorMethods
No methods match this filter.
Overview
This also works if serialize-error is a sub-dependency that’s not used directly, as long as the project ends up with a single physical copy of the package.
API reference status
This page lists only entry points that appear verbatim in the official README examples: toJSON, serializeError, super, isErrorLike. Parameter and return types are not given by the official README, so signatures are marked unverified.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/sindresorhus/serialize-error@latest/readme.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:52:28.094Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- API ### serializeError(value, options?) Serialize an Error object into a plain object. (https://cdn.jsdelivr.net/gh/sindresorhus/serialize-error@latest/readme.md)
- This is useful when a custom error implements its own serialization logic via .toJSON() but you prefer to not use it. (https://cdn.jsdelivr.net/gh/sindresorhus/serialize-error@latest/readme.md)
- Registered constructors/factories must consistently return extensible errors. (https://cdn.jsdelivr.net/gh/sindresorhus/serialize-error@latest/readme.md)
Verification notes
- Official source: https://github.com/sindresorhus/serialize-error
- Evidence: https://cdn.jsdelivr.net/gh/sindresorhus/serialize-error@latest/readme.md
- Checked on 2026-11-04 by
scripts/phase11/build-api-profiles.mjs
FAQ
- What does serialize-error do?
- This also works if serialize-error is a sub-dependency that's not used directly, as long as the project ends up with a single physical copy of the package.
- How do I install serialize-error?
- Run `npm install serialize-error`.
- Where can I verify the API details?
- Official repository/documentation: https://github.com/sindresorhus/serialize-error. Checked on 2026-11-04; signatures and return values not stated in the official README are marked unverified.
Report a problem with this API docOpens a pre-filled issue on GitHub.