create-expo-cljs-app
Version:
Create a react native application with Expo and Shadow-CLJS!
32 lines (18 loc) • 693 B
Markdown
into a plain object
Useful if you for example need to `JSON.stringify()` or `process.send()` the error.
```
$ npm install --save serialize-error
```
```js
const serializeError = require('serialize-error');
const error = new Error('unicorn');
console.log(error);
//=> [Error: unicorn]
console.log(serializeError(error));
//=> {name: 'Error', message: 'unicorn', stack: 'Error: unicorn\n at Object.<anonymous> ...'}
```
MIT © [Sindre Sorhus](https://sindresorhus.com)
> Serialize an error