GregBrimble/cf-workers-dashboard

View on GitHub
packages/server/src/utils/getUtf8Bytes.ts

Summary

Maintainability
A
0 mins
Test Coverage
export const getUtf8Bytes = (str: string) =>
  new Uint8Array(
    [...unescape(encodeURIComponent(str))].map((c) => c.charCodeAt(0))
  );