question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This is labeled as <kbd>maybe</kbd> because 2/3 of the exports listed as just aliases of built-in methods. However, this may still be useful because, personally, I rarely remember the atob-vs-btoa direction on the first try 😅

Exports:

  • encode (alias for btoa)
  • decode (alias for atob)
  • toURL – URL-safe Base64 value

Another possibility is that only toURL is added to worktop/utils as toBase64URL & then users are left to remember btoa-vs-atob on their own 😬

I think I personally prefer a base64 module, even if it’s somewhat trivial. Thoughts?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Mar 22, 2021

I ended up going with the name base64url for the toURL/encodeURL function. Thanks!

1reaction
saibotsivadcommented, Mar 22, 2021

I would probably use it, because, like you, I don’t usually get it right on the first try either 😅 so I usually make a base64 module to alias the built-in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

worktop/base64.d.ts at master · lukeed/worktop · GitHub
The next generation web framework for Cloudflare Workers - worktop/base64.d.ts at master · lukeed/worktop.
Read more >
Luke Edwards on Twitter: "Released `worktop@0.2.0` yesterday ...
Announcing `worktop`, the next-gen web framework for Cloudflare Workers!! It's like a Polka/Express/Fastify, but for the Workers platform 1st-class ...
Read more >
worktop - npm
View worktop/base64 API documentation. The worktop/base64 submodule contains a few utilities related to the Base 64 encoding.
Read more >
worktop/readme.md - UNPKG
[View `worktop/base64` API documentation](/docs/module.base64.md) -->. 177. 178, The `worktop/base64` submodule contains a few utilities related to the ...
Read more >
Manager.Add does not start Cache after Manager has already ...
(Question) - FFMediaToolkit · worktop/base64 - TypeScript worktop · "Live Reload is not possible as body or head tag or defined tag is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found