initial public commit
This commit is contained in:
11
dist-node/utils.js
Normal file
11
dist-node/utils.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import base32 from "base32.js";
|
||||
const base32Encode = (payload) => {
|
||||
const encoder = new base32.Encoder({ type: "rfc4648" });
|
||||
return encoder.write(payload).finalize();
|
||||
};
|
||||
const getValueOrFirstEntry = (value) => Array.isArray(value) && value.length ? value[0] : value;
|
||||
export {
|
||||
base32Encode,
|
||||
getValueOrFirstEntry
|
||||
};
|
||||
//# sourceMappingURL=utils.js.map
|
||||
Reference in New Issue
Block a user