skip to main content

What is lodashing ?




Lodashing was born of a desire to try out some new technologies, apply some recent learning, and also build something that, at the very least, I could use for myself to better know what is available in lodash. Also, I wasn't entirely thrilled by the experience of using lodash's docs.


As a librarian who frequently helps students conduct research, effective search tools matter a lot to me. It seemed to me that using Algolia to provide a nice search of lodash would be a good start. After all, lodash's docs provide only a search of method names. But I didn't want that to be all. How can we make our enhanced search experience even better? For example, if you searched for "unique" you wouldn't get the method named "uniq"... This didn't feel right. I also wanted to start enhancing the search with terms and phrases that were synonomous in common usage with things used in the official documentation. So that someone searching for "removed" would also get things like _.drop. These additional search enhancements are an ongoing part of development and I would love your suggestions.


How it's made

First, the lodash docs are scraped using Puppeteer. Then some data processing happens so that what we need is extracted. I wanted to try out Sanity.io so our processed lodash documentation gets uploaded to Sanity. In Sanity I have one collection with each lodash method as its own item. Then, to build this site, 11ty is used. Because it's great. We talk to Sanity during the build process to get all of our methods. For this site I tried out using the Eleventastic 11ty starter kit because it looked nice and provides some foundational extras — things like Sass compilation and Webpack bundling for our Javascript. Separately from our build, we send our data from Sanity directly into Algolia, where we do some additional massaging of our data to enhance the search experience. Lastly, the site is hosted with a free plan from Netlify.