At the end of the day, I’m still torn. Early on, I would add dependencies whenever I needed to do anything that already existed in an NPM package. Now that I’ve maintained several apps and been burned by dependencies countless times, however, I’m reluctant to add another one unless I absolutely need to. While I do appreciate the time they buy me, that’s often only short-term. I still regret several dependencies in Cushion that I’ll inevitably need to remove and rewrite, but maybe the more optimistic view is to realize that they served their purpose at that time.
In this case, I’m only looking at long-term. Time is wide-open and I’m not longer sprinting. Maybe I’ll try writing this one method, see how it goes, and if I find myself needing a dozen methods that already exist in lodash, I’ll reconsider.