UNPKG

@xsprtd/nuxt-api

Version:

Nuxt API Authentication and Http Client

5 lines (4 loc) 186 B
export default (response, wrapperKey) => { if (!wrapperKey) return response; return wrapperKey.split(".").reduce((accumulator, key) => accumulator && accumulator[key], response); };