Fixup Base64 node and add better tests

Revert correct <-> behaviour, make encoding info clearer, added type
checking - to close #401 and close #437
This commit is contained in:
Dave Conway-Jones
2018-04-29 17:35:30 +01:00
parent 5019f68c9c
commit 6a28ecfbc2
4 changed files with 148 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
<label for="node-input-action"><i class="fa fa-dot-circle-o"></i> Action</label>
<select style="width:70%" id="node-input-action">
<option value="">Convert Buffer <-> Base64</option>
<option value="str">Convert String to Base64</option>
<option value="str">Encode as Base64</option>
<option value="b64">Convert Base64 to String</option>
</select>
</div>
@@ -22,7 +22,8 @@
<p>A function that converts the chosen property (default <code>msg.payload</code>) to and from base64 format.</p>
<p>If the input is a buffer it converts it to a Base64 encoded string.</p>
<p>If the input is a Base64 string it converts it back to a binary buffer.</p>
<p>You can also fix conversion string to base64,and base64 to string if required.</p>
<p>You can also fix coding into base64, and base64 to buffer if required.</p>
<p>Note: Using "Encode to Base64" will encode an already encoded string.</p>
</script>
<script type="text/javascript">