function convertBufferToString(value, encoding) {
    if (value instanceof Buffer) {
        return value.toString(encoding);
    }
    if (Array.isArray(value)) {
        const length = value.length;
        const res = Array(length);
        for (let i = 0; i < length; ++i) {
            res[i] =
                value[i] instanceof Buffer && encoding === "utf8"
                    ? value[i].toString()
                    : convertBufferToString(value[i], encoding);
        }
        return res;
    }
    return value;
}
Convert a buffer to string, supports buffer array

@param {*} value - The input value
@param {string} encoding - string encoding
@return {*} The result
@example
```js
var input = [Buffer.from('foo'), [Buffer.from('bar')]]
var res = convertBufferToString(input, 'utf8')
expect(res).to.eql(['foo', ['bar']])
```
@private