MCPcopy Index your code
hub / github.com/SocketCluster/socketcluster / byteLength

Function byteLength

app/public/socketcluster-client.js:2504–2509  ·  view source on GitHub ↗
(b64)

Source from the content-addressed store, hash-verified

2502
2503// base64 is 4/3 + up to two characters of the original data
2504function byteLength (b64) {
2505 var lens = getLens(b64)
2506 var validLen = lens[0]
2507 var placeHoldersLen = lens[1]
2508 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2509}
2510
2511function _byteLength (b64, validLen, placeHoldersLen) {
2512 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen

Callers 1

fromStringFunction · 0.85

Calls 4

getLensFunction · 0.85
isInstanceFunction · 0.85
utf8ToBytesFunction · 0.85
base64ToBytesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…