# b3b

buffer convert util

### convert map

```
ArrayBuffer -------- Buffer
\                      /
 \                    /
   ----  base64  -----
```

### api

- #### 0

  - **file**: 

    buffer convert util

  - **author**: 

    junmer

  - **description**: 

    ArrayBuffer / Buffer / base64 convert util

- #### ab2b (alias: arrayBufferToBuffer ) 
  convert arrayBuffer to buffer

  - **param**: `ab` { _ArrayBuffer_ }

    arrayBuffer

  - **return**: { _buffer_ }

    buffer

- #### b2ab (alias: bufferToArrayBuffer ) 
  convert buffer to arrayBuffer

  - **param**: `buffer` { _buffer_ }

    buffer

  - **return**: { _ArrayBuffer_ }

    arrayBuffer

- #### a2b (alias: base64ToBuffer ) 
  convert base64 string to buffer

  - **param**: `str` { _string_ }

    base64 string

  - **return**: { _Buffer_ }

    buffer

- #### b2a (alias: bufferToBase64 ) 
  convert buffer to base64 string

  - **param**: `str` { _string|Buffer_ }

    string or buffer

  - **return**: { _string_ }

    base64 string

- #### b2b (alias: bytesToBase64 ) 
  convert arraybuffer to base64 string

  - **param**: `ab` { _ArrayBuffer|Array_ }

    ArrayBuffer or Array

  - **return**: { _string_ }

    base64 string

