MCPcopy
hub / github.com/node-red/node-red / encode

Function encode

test/nodes/core/storage/10-file_spec.js:28–33  ·  view source on GitHub ↗
(s, enc)

Source from the content-addressed store, hash-verified

26describe('file Nodes', function() {
27
28 function encode(s, enc) {
29 if (enc === "none") {
30 return Buffer.from(s);
31 }
32 return iconv.encode(s, enc);
33 }
34
35 function decode(data, enc) {
36 if (enc === "none") {

Callers 2

checkWriteWithEncodingFunction · 0.85
checkReadWithEncodingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected