From dc9fa81346f07f6657f6c6501690460be634da66 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 22 Jun 2017 18:42:54 +0100 Subject: [PATCH] let split of objects use key to set another property (e.g. topic) and add tests and update messages --- nodes/core/locales/en-US/messages.json | 17 ++++++++++------ nodes/core/logic/17-split.html | 28 ++++++++++++++++++-------- nodes/core/logic/17-split.js | 3 +++ test/nodes/core/logic/17-split_spec.js | 25 ++++++++++++++++++++++- 4 files changed, 58 insertions(+), 15 deletions(-) diff --git a/nodes/core/locales/en-US/messages.json b/nodes/core/locales/en-US/messages.json index 83509a020..df3b3d98a 100644 --- a/nodes/core/locales/en-US/messages.json +++ b/nodes/core/locales/en-US/messages.json @@ -758,7 +758,9 @@ "action": "Action", "addnewline": "Add newline (\\n) to each payload?", "createdir": "Create directory if it doesn't exist?", - "outputas": "Output as", + "outputas": "Output", + "breakchunks": "Break into chunks", + "breaklines": "Break into lines", "filelabel": "file", "deletelabel": "delete __file__" }, @@ -768,8 +770,10 @@ "delete": "delete file" }, "output": { - "utf8": "a utf8 string", - "buffer": "a Buffer" + "utf8": "a single utf8 string", + "buffer": "a single Buffer object", + "lines": "a msg per line", + "stream": "a stream of Buffers" }, "status": { "wrotefile": "wrote to file: __file__", @@ -792,9 +796,10 @@ "objectSend":"Send a message for each key/value pair", "strBuff":"String / Buffer", "array":"Array", - "splitUsing": "Split using", - "splitLength": "Fixed length of", - "stream":"Handle as a stream of messages" + "splitUsing":"Split using", + "splitLength":"Fixed length of", + "stream":"Handle as a stream of messages", + "addname":" Copy key to " }, "join":{ "mode":{ diff --git a/nodes/core/logic/17-split.html b/nodes/core/logic/17-split.html index 39973eab3..f8efa6bfb 100644 --- a/nodes/core/logic/17-split.html +++ b/nodes/core/logic/17-split.html @@ -16,24 +16,29 @@ +