UNPKG

react-refetch

Version:

A simple, declarative, and composable way to fetch data for React components.

16 lines (13 loc) 321 B
'use strict'; exports.__esModule = true; exports['default'] = deepValue; function deepValue(obj, path) { for (var i = 0, spath = path.split('.'), len = spath.length; i < len; i++) { if (obj === undefined) { return obj; } obj = obj[spath[i]]; } return obj; } module.exports = exports['default'];