We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa582a0 commit c7ae9c1Copy full SHA for c7ae9c1
lib/spawn.js
@@ -32,6 +32,10 @@ if (!transcode) {
32
* @returns {Buffer}
33
*/
34
transcode = function(source, fromEncoding, toEncoding) {
35
+ // Same encoding
36
+ if (fromEncoding === toEncoding) return source;
37
+
38
+ // Transcode
39
return toBuffer(source.toString(fromEncoding), toEncoding);
40
};
41
}
0 commit comments