fix mutants
This commit is contained in:
parent
9ac35f5866
commit
a3b25f5381
4
index.js
4
index.js
@ -15,7 +15,7 @@
|
||||
* @param {string} encoding encoding the string is in
|
||||
* @returns {string} base64
|
||||
*/
|
||||
function to_b64 (str, encoding = 'utf-8') {
|
||||
function to_b64 (str, encoding = '') {
|
||||
const buf = Buffer.from (str, encoding);
|
||||
return buf.toString ('base64');
|
||||
}
|
||||
@ -39,7 +39,7 @@ function to_utf8 (str, encoding) {
|
||||
* @param {string} encoding encoding the string is in
|
||||
* @returns {string} hex
|
||||
*/
|
||||
function to_hex (str, encoding = 'utf-8') {
|
||||
function to_hex (str, encoding = '') {
|
||||
const buf = Buffer.from (str, encoding);
|
||||
return buf.toString ('hex');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user