UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

13 lines (11 loc) 317 B
// @ts-check /** * Extract a human-readable message from an unknown thrown value. * Errors keep their `.message`; anything else is coerced to a string. * @param {unknown} err * @returns {string} */ export function getErrMessage(err) { if (err instanceof Error) return err.message; return String(err); }