npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-solobuilder-merge

v1.0.0

Published

Extended Merge node for n8n with dynamic number of inputs support

Readme

Merge Extended Node for n8n

一个强大的 n8n 节点插件,提供扩展的数据合并功能,支持动态输入数量配置,让用户可以灵活地选择合并多少个数据流。

功能特性

🎯 核心功能

  • 动态输入配置 - 用户可以手动设置输入数量(2-10个),接口会自动增加相应的输入端口
  • 多种合并模式 - 支持4种强大的数据合并模式
  • 灵活的数据处理 - 支持字段匹配、位置合并、组合生成、分支选择

📋 支持的合并模式

1. Append 模式(追加)

  • 将所有输入的数据按顺序连接
  • 保留所有项目,不进行任何过滤或匹配
  • 适用场景:数据集合、列表合并

2. Combine 模式(组合)

支持三种合并方式:

  • Matching Fields(字段匹配)

    • 根据指定的字段值进行匹配合并
    • 支持多个输出类型:
      • 保留匹配项(Inner Join)
      • 保留非匹配项
      • 保留全部(Outer Join)
      • 仅保留Input1(Left Join)
    • 支持冲突处理:优先级选择、添加输入编号后缀
  • Position(位置合并)

    • 基于数据项的索引位置进行合并
    • 支持是否包含未配对的项
  • All Possible Combinations(全组合)

    • 生成所有可能的组合
    • 适用于交叉连接场景

3. SQL Query 模式

  • 使用 SQL 语法进行复杂的数据合并操作
  • 支持的操作:
    • SELECT * FROM input1 - 选择单个输入的所有数据
    • LEFT JOIN input2 ON input1.field = input2.field - 左连接
    • 支持 INNER JOIN 进行内连接

4. Choose Branch 模式(选择分支)

  • 从多个输入中选择一个返回
  • 支持返回空项

安装

使用 npm

npm install n8n-nodes-merge-extended

在 n8n 中安装

  1. 打开 n8n
  2. 进入设置 > 社区节点
  3. 搜索 merge-extended
  4. 点击安装

使用示例

示例 1:追加模式

设置 3 个输入,使用 Append 模式
- Input 1: 用户列表1
- Input 2: 用户列表2
- Input 3: 用户列表3
结果:合并后的完整用户列表

示例 2:字段匹配模式

设置匹配字段:user_id
Mode: Combine
Combine By: Matching Fields
Fields to Match: user_id
Output Type: Keep Matches

- Input 1: 用户基本信息(包含 user_id)
- Input 2: 用户订单信息(包含 user_id)
结果:只返回两个表中都存在的用户及其完整信息

示例 3:位置合并

Mode: Combine
Combine By: Position
- Input 1: [A1, A2, A3]
- Input 2: [B1, B2, B3]
结果: [{A1+B1}, {A2+B2}, {A3+B3}]

示例 4:SQL Query 模式

SQL Query: SELECT * FROM input1 LEFT JOIN input2 ON input1.id = input2.id
- Input 1: 产品信息
- Input 2: 库存信息
结果:左连接,保留所有产品和匹配的库存数据

配置参数

必填参数

  • Mode - 选择合并模式
  • Number of Inputs - 输入数量(2-10)

可选参数(根据模式选择)

  • Combine By - 合并方式(字段匹配/位置/全组合)
  • Fields to Match - 要匹配的字段名(逗号分隔)
  • Output Type - 输出类型(保留匹配/非匹配/全部/仅Input1)
  • Clash Handling - 字段冲突处理方式
  • SQL Query - 自定义 SQL 查询
  • Choose Input - 选择要返回的输入

高级选项

  • Fuzzy Compare - 宽松类型比较("3" 等同于 3)
  • Disable Dot Notation - 禁用点符号字段访问
  • Include All Unpaired Items - 在位置合并中包含未配对项

特点优势

动态输入 - 灵活配置输入数量,不再受限于固定的 2 个输入 ✅ 强大的合并能力 - 支持复杂的数据关联和组合 ✅ 易于使用 - 直观的 UI,参数配置清晰 ✅ 高性能 - 优化的算法,支持大数据量处理 ✅ 灵活扩展 - 支持自定义 SQL 查询进行复杂操作

开发信息

项目结构

merge/
├── src/
│   ├── nodes/
│   │   └── Merge/
│   │       ├── Merge.node.ts    # 主节点实现
│   │       └── merge.svg        # 节点图标
│   └── index.ts
├── dist/                        # 编译后的代码
├── package.json
└── tsconfig.json

构建项目

npm install
npm run build

开发模式

npm run dev

发布到 npm

npm run publish

兼容性

  • n8n 版本:0.194.0 及以上
  • Node.js:14.0.0 及以上
  • 操作系统:Windows、macOS、Linux

许可证

MIT

支持和反馈

如有问题或建议,欢迎提交 Issue 或 Pull Request。

更新日志

v1.0.0 (2025-12-10)

  • 初版发布
  • 支持动态输入配置
  • 实现 4 种合并模式
  • 完整的字段匹配和冲突处理