Skip to content
Myr

custom-throw.js

This file

Path

test/fixtures/nested/custom-throw.js

7 lines · 177 bytes · JavaScript

Last changed by

Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348

History of this file

Take it

Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348

lines 1–7why, one step back
1export const getOptions = ({type, errorMessage}) => ({
2 verbose(verboseLine, verboseObject) {3 if (verboseObject.type === type) {4 throw new Error(errorMessage);5 }6 },7});