Skip to content
Myr

reject.js

This file

Path

lib/return/reject.js

13 lines · 302 bytes · JavaScript

Last changed by

TweaksSindre Sorhusbefore adoption698a1b8

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

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

line 1why, one step back
1import {logResult} from '../verbose/complete.js';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–5why, one step back
2
3// Applies the `reject` option.4// Also print the final log line with `verbose`.5export const handleResult = (result, verboseInfo, {reject}) => {

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

line 6why, one step back
6 logResult(result, verboseInfo);

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 7why, one step back
7

TweaksSindre Sorhusbefore adoption698a1b8

line 8why, one step back
8 if (reject && result.failed) {

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 9–13why, one step back
9 throw result;
10 }1112 return result;13};