2 ms·
> It can be easier to maintain a small amount of code that you duplicate and check in > compared to a general library imported for one routine that you have to
by pcr910303 7y ago
> It can be easier to maintain a small amount of code that you duplicate and check in
> compared to a general library imported for one routine that you have to think about
IMHO, that's why small, one-utility-function libraries in the JS ecosystem([0], [1], [2]) are useful. (Unlike the general tone in HN where npm and left-pad gets a lot of hate.)
Look at Quickutil[3] for examples of other languages. (In this case, Common Lisp.)
[0] https://github.com/sindresorhus/mem/blob/master/index.js#L7 https://github.com/sindresorhus/mem/blob/master/index.js#L7
[1] https://github.com/sindresorhus/tempy/blob/master/index.js#L9 https://github.com/sindresorhus/tempy/blob/master/index.js#L...
[2] https://github.com/zeit/ms/blob/master/index.js#L48 https://github.com/zeit/ms/blob/master/index.js#L48
[3] http://quickutil.org http://quickutil.org