MCPcopy Index your code
hub / github.com/apache/pouchdb / thisAtob

Function thisAtob

lib/index.js:4458–4466  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

4456}
4457
4458function thisAtob(str) {
4459 var base64 = Buffer.from(str, 'base64');
4460 // Node.js will just skip the characters it can't decode instead of
4461 // throwing an exception
4462 if (base64.toString('base64') !== str) {
4463 throw new Error("attachment is not a valid base64 string");
4464 }
4465 return base64.toString('binary');
4466}
4467
4468function thisBtoa(str) {
4469 return Buffer.from(str, 'binary').toString('base64');

Callers 2

writeDocFunction · 0.70
HttpPouchFunction · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…