Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
d82c8719
Commit
d82c8719
authored
Apr 23, 2022
by
Konrad Mohrfeldt
Browse files
feat: add has helper-function
parent
771415e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/utilities.js
View file @
d82c8719
...
...
@@ -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
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment