I tend to use function I call safe: const safe = f => x => x && f(x)
for these purposes. I just wrap all my functions that don't expect null/undefined into it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I tend to use function I call
safe
:const safe = f => x => x && f(x)
for these purposes. I just wrap all my functions that don't expect null/undefined into it.