Encodes data with MIME base64.
Base64-encoded data takes about 33% more space than the original data.
Install
Install all functions of strman
yarn add strman
or just the base64encode function
yarn add strman.base64encode
Usage
import { base64encode } from 'strman'
// OR
import base64encode from 'strman.base64encode'
Parameters:
Name | Type | Description |
---|---|---|
value |
String | The data to encode. |
- Source:
Returns:
The base64 encoded data.
- Type
- String
Example
base64Encode('strman')
// => 'c3RybWFu'