Apply all function to individual patterns rather than final stack (#1209)
This commit is contained in:
parent
726abf76ce
commit
ef53367ba9
1 changed files with 6 additions and 3 deletions
|
|
@ -152,9 +152,12 @@ export function repl({
|
|||
shouldHush && hush();
|
||||
let { pattern, meta } = await _evaluate(code, transpiler, transpilerOptions);
|
||||
if (Object.keys(pPatterns).length) {
|
||||
pattern = stack(...Object.values(pPatterns));
|
||||
}
|
||||
if (allTransform) {
|
||||
let patterns = Object.values(pPatterns);
|
||||
if (allTransform) {
|
||||
patterns = patterns.map(allTransform);
|
||||
}
|
||||
pattern = stack(...patterns);
|
||||
} else if (allTransform) {
|
||||
pattern = allTransform(pattern);
|
||||
}
|
||||
if (!isPattern(pattern)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue