From 3217be896d0e628aaa2ffdae2e0da57ed0d4b0b3 Mon Sep 17 00:00:00 2001 From: Bart Veneman <1536852+bartveneman@users.noreply.github.com> Date: Sun, 10 Nov 2024 15:55:05 +0100 Subject: [PATCH] use for-loop instead of map/filter --- src/index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 2e14230..887086b 100644 --- a/src/index.js +++ b/src/index.js @@ -62,12 +62,9 @@ export function resolve_ast(ast) { // @layer first, second; if (node.block === null) { - layer_name - .split(',') - .map((name) => name.trim()) - .forEach((name) => { - list.push([...resolve_parent_tree(ast, node), name]) - }) + for (let name of layer_name.split(',')) { + list.push([...resolve_parent_tree(ast, node), name.trim()]) + } return this.skip }