nodejs
nodejs copied to clipboard
Optimize auth.js: Replace Buffer.byteLength(body).toString() with simple body.length
Summary
Replace Buffer.byteLength(body).toString() with simple body.length. It allows to use only Buffer.from polyfill, instead of the entire Buffer's polyfill (around 50kb)
Description
Check the sdk-auth umd file - we see the entire Buffer's polyfill here. For what?
Todo
- Tests
- [ ] Unit
- [ ] Integration
- [ ] Acceptance
- [ ] Documentation
- [ ]
Type
label for the PR