Add get util fn

This commit is contained in:
Vadim
2021-06-29 11:15:54 +03:00
parent de63352637
commit c4d426e03d
2 changed files with 4 additions and 0 deletions

3
src/utils/object.js Normal file
View File

@@ -0,0 +1,3 @@
export const get = (object, field, defaultValue) => {
return object && object.hasOwnProperty(field) ? options[field] : defaultValue
}