fetchRandomSnippet = async () => {
  const settings = await getSettingsFromStorage();
  const enabledLibraries = Object.keys(SNIPPET_LIBRARIES).filter((val) => {
    return settings.libs[val];
  });
  const randomLibrary = randArrayItem(enabledLibraries);
  const snippetSources = Object.keys(snippetsData[randomLibrary]);
  const randomSnippet = randArrayItem(snippetSources);
  const snippetData = snippetsData[randomLibrary][randomSnippet];

  const savedSnipepts = await getSnippetsFromStorage();
  const isSaved = !!lodashFind(savedSnipepts, { id: randomSnippet });

  snippetData.saved = isSaved;
  return snippetData;
}
NOTE: This function fetches a random snippet and
builds snippet data object.