Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/teambit/bit
/ toBase64
Function
toBase64
src/utils/string/to-base64.ts:12–15 ·
view source on GitHub ↗
(val: string | Buffer)
Source
from the content-addressed store, hash-verified
10
* ```
11
*/
12
export
default
function
toBase64(val: string | Buffer) {
13
if
(val instanceof Buffer)
return
val.toString(
'base64'
);
14
return
Buffer.from(val).toString(
'base64'
);
15
}
Callers
3
pack
Function · 0.90
buildCmd
Method · 0.90
pack-command.ts
File · 0.85
Calls
2
toString
Method · 0.45
from
Method · 0.45
Tested by
no test coverage detected