The encoding option accepts the same values as Node.js child_process:
utf8
buffer
utf16le
hex
base64
base64url
latin1
ascii
It also allows the following:
null as an alias to buffer
utf-8 as an alias to utf8
utf-16le, ucs2 and ucs-2 as aliases to utf16le
binary as an alias to latin1
Any case, e.g. UTF8 instead of utf8
@sindresorhus Do you think we should support the same options as core Node.js, or we should be stricter? If stricter, which of the above should be kept or not?
The
encoding
option accepts the same values as Node.jschild_process
:utf8
buffer
utf16le
hex
base64
base64url
latin1
ascii
It also allows the following:
buffer
utf-8
as an alias toutf8
utf-16le
,ucs2
anducs-2
as aliases toutf16le
binary
as an alias tolatin1
UTF8
instead ofutf8
@sindresorhus Do you think we should support the same options as core Node.js, or we should be stricter? If stricter, which of the above should be kept or not?