Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const _getProfileImageId = (imageUrl) => {
- if (imageUrl !== null) {
- const profileImageSplitted = imageUrl.split('/').filter((item) => item.length > 0);
- if (_.includes(profileImageSplitted, 'image')) {
- const imageElementIndex = _.indexOf(profileImageSplitted, 'image');
- const imageId = profileImageSplitted[imageElementIndex + 1];
- console.log('imageElementIndex: ', imageElementIndex);
- console.log('image id: ', imageId);
- }
- } else {
- return null;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement