Skip to content

Tag: javascript

Checking ‘undefined’ or ‘null’ of any Object

I am working on Angular project and time to time I used to have check undefined or null over Object or it’s properties. Normally I use lodash _.isUndefined() see example below: I couldn’t see any problem with it. But I had discussion with my colleague during review of above code. He was telling me…

Splitting a string before finding longest word

I have read a few different posts on this so I am sorry to ask this again but none seemed to solve my issue. I’m trying to draw out the length of the longest word in a string, that is coming from HTML. All I can get is, “Uncaught TypeError: Cannot read property ‘split’ of undefined&#82…

How to add custom Icons to NativeBase

I have the .ttf and .svg files for customized icons that I designed. But I would like to import them into my NativeBase project, making them available for use in NB’s <Icon /> component. How can I achieve this? Answer React Native Custom Icon Font for NativeBase Adopted from: https://medium.com/@k…