Commit d82c8719 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt
Browse files

feat: add has helper-function

parent 771415e2
......@@ -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
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment