All files / src/buildUtils/storybook/webpack helpers.ts

0% Statements 0/6
100% Branches 0/0
0% Functions 0/4
0% Lines 0/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8               
import { RuleSetRule } from "webpack";
import { MaybeRuleSetRule, Transform } from "./types";
 
// Helper function to check if an item is a RuleSetRule
export const isRuleSetRule = (rule: MaybeRuleSetRule): rule is RuleSetRule => typeof rule === 'object';
 
// helper function to make transforms readable.
export const compose = <T>(...funcs: Transform<T>[]): Transform<T> => (input: T): T => funcs.reduce((value, fn) => fn(value), input)