Skip to content
Snippets Groups Projects
Commit 6fd3bef2 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: add has helper-function

parent 1140b802
Branches
Tags
1 merge request!10Allow API store consumers to use traditional flow-control
......@@ -5,3 +5,11 @@ export function uppercaseFirst(string = "") {
export function lowercaseFirst(string = "") {
return string.charAt(0).toLowerCase() + string.slice(1)
}
export function has(obj, prop) {
try {
return Object.prototype.hasOwnProperty.call(obj, prop)
} catch (e) {
return false
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment