_.forEachRight($scope.categories, function (category, i) { if (regex.test(category.path)) { $scope.categories.splice(i, 1);
// unsure why not regular forEach _.forEachRight(node.outgoing, (connection) => { if (mutation.SUB_NODE.keep_gates && connection.gater !== null && connection.gater !== node) { gates.push(connection.gater); } outputs.push(connection.to); self.disconnect(node, connection.to); });
_.forEachRight(input, value => { if (typeInspect.isSerializable(value)) { const result = renderer.renderSerializableArrayValue(value, options, indentation) stack.push({ input: result, noRender: true }) return true } if (depth + 1 > options.maxDepth) { const result = renderer.renderMaxDepthArrayValue(options, indentation) stack.push({ input: result, noRender: true }) return true } // In all other cases stack.push({ input: value, indentation: renderer.indent(indentation, options), depth: depth + 1 }) const dash = renderer.renderDash(options, indentation) stack.push({ input: `${dash}\n`, noRender: true }) })
_.forEachRight(keys, key => { const value = input[key] if (isError && key === 'stack') { const result = renderer.renderObjectErrorStack(key, value, options, indentation) stack.push({ input: result, noRender: true }) return true } if (typeInspect.isSerializable(value)) { const result = renderer.renderSerializableObjectValue(key, value, valueColumn, options, indentation) if (result !== undefined) { stack.push({ input: result, noRender: true }) } return true } if (depth + 1 > options.maxDepth) { const result = renderer.renderMaxDepthObjectValue(key, valueColumn, options, indentation) stack.push({ input: result, noRender: true }) return true } // In all other case stack.push({ input: value, depth: depth + 1, indentation: renderer.indent(indentation, options) }) const renderedKey = renderer.renderObjectKey(key, options, indentation) stack.push({ input: `${renderedKey}\n`, noRender: true }) })
// unsure why not regular forEach _.forEachRight(node.incoming, (connection) => { if (mutation.SUB_NODE.keep_gates && connection.gater !== null && connection.gater !== node) { // the condition mutation.SUB_NODE.keep_gates seems // useless - probably it should be an option gates.push(connection.gater); } inputs.push(connection.from); self.disconnect(connection.from, node); });