All files translate.js

100% Statements 4/4
100% Branches 0/0
100% Functions 3/3
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11      2x 1x 1x 1x        
import { memoize } from 'cerebro-tools'
import { api } from './constants'
 
export const translate = (params) => {
  return fetch(api(params))
    .then(response => response.json())
    .then(data => data[0][0][0])
}
 
export default memoize(translate)