[v8.x backport] lib: move duplicate spliceOne into internal/util
lib/url.js and lib/events.js are using the same spliceOne function. This change is to move it into the internal/util for avoiding duplicate code.
PR-URL: https://github.com/nodejs/node/pull/16221 Reviewed-By: Timothy Gu timothygu99@gmail.com Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: Vse Mozhet Byt vsemozhetbyt@gmail.com Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Luigi Pinca luigipinca@gmail.com Reviewed-By: Anatoli Papirovski apapirovski@mac.com Reviewed-By: Refael Ackermann refack@gmail.com
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
util,url,events