-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
Description
Thank you for the great library!
I have a usecase with symbols that is not currently working, here is some sample code:
const ono = require('ono');
const SOME_PROP = Symbol('symbol-name');
// const SOME_PROP = 'string-key'; // (string keys work correctly)
function fun() {
try {
throw new Error('original error');
} catch (e) {
throw ono(e, { [SOME_PROP]: true }, 'wrapped with [SOME_PROP]');
}
}
try {
fun();
} catch (e) {
console.log(`Has prop: ${e[SOME_PROP] || false}`);
}