summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-07-27 22:10:27 -0700
committerMatthew Miller <matthew@millerti.me>2022-07-27 22:10:27 -0700
commita0468e98a2be9860e303eeb752bf065b1580fe47 (patch)
treeb4f8a8e35d49d28f7fa4e75efa7f378ac54e9288 /packages/browser/src
parente92a262817422404fe60476b8cb39e03a909baa5 (diff)
Export named utf8StringToBuffer()
Diffstat (limited to 'packages/browser/src')
-rw-r--r--packages/browser/src/helpers/utf8StringToBuffer.ts2
-rw-r--r--packages/browser/src/methods/startRegistration.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/browser/src/helpers/utf8StringToBuffer.ts b/packages/browser/src/helpers/utf8StringToBuffer.ts
index 32cb717..b15e5fe 100644
--- a/packages/browser/src/helpers/utf8StringToBuffer.ts
+++ b/packages/browser/src/helpers/utf8StringToBuffer.ts
@@ -2,6 +2,6 @@
* A helper method to convert an arbitrary string sent from the server to an ArrayBuffer the
* authenticator will expect.
*/
-export default function utf8StringToBuffer(value: string): ArrayBuffer {
+export function utf8StringToBuffer(value: string): ArrayBuffer {
return new TextEncoder().encode(value);
}
diff --git a/packages/browser/src/methods/startRegistration.ts b/packages/browser/src/methods/startRegistration.ts
index 9b34cfc..f809405 100644
--- a/packages/browser/src/methods/startRegistration.ts
+++ b/packages/browser/src/methods/startRegistration.ts
@@ -4,7 +4,7 @@ import {
RegistrationCredentialJSON,
} from '@simplewebauthn/typescript-types';
-import utf8StringToBuffer from '../helpers/utf8StringToBuffer';
+import { utf8StringToBuffer } from '../helpers/utf8StringToBuffer';
import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString';
import { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer';
import { browserSupportsWebauthn } from '../helpers/browserSupportsWebauthn';