Skip to content
Myr

reject.js

This file

Path

lib/return/reject.js

13 lines · 320 bytes · JavaScript

Last changed by

Add more code comments (#984)ehmickybefore adoptionfdd8a9f

History of this file

Take it

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

lines 1–2why, one step back
1import {logFinalResult} from '../verbose/complete.js';
2

Add more code comments (#984)ehmickybefore adoptionfdd8a9f

lines 3–4why, one step back
3// Applies the `reject` option.
4// Also print the final log line with `verbose`.

Split files into smaller ones (#976)ehmickybefore adoptiond7c6853

lines 5–13why, one step back
5export const handleResult = (result, verboseInfo, {reject}) => {
6 logFinalResult(result, reject, verboseInfo);78 if (result.failed && reject) {9 throw result;10 }1112 return result;13};