feat(btoa): port and modify from Array.findindex

Use `isFunction` helper.
```javascript
// In above
var isFunction = require("../helpers/isFunction");

if (isFunction(predicate)) { //...
```