- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
13 lines
497 B
JavaScript
13 lines
497 B
JavaScript
import toPath from './_toPath.js';
|
|
import deepGet from './_deepGet.js';
|
|
import isUndefined from './isUndefined.js';
|
|
|
|
// Get the value of the (deep) property on `path` from `object`.
|
|
// If any property in `path` does not exist or if the value is
|
|
// `undefined`, return `defaultValue` instead.
|
|
// The `path` is normalized through `_.toPath`.
|
|
export default function get(object, path, defaultValue) {
|
|
var value = deepGet(object, toPath(path));
|
|
return isUndefined(value) ? defaultValue : value;
|
|
}
|