path: refactor normalizeArray()
authorNathan Woltman <nwoltman@outlook.com>
Fri, 21 Nov 2014 08:22:07 +0000 (03:22 -0500)
committerTrevor Norris <trev.norris@gmail.com>
Wed, 26 Nov 2014 20:16:56 +0000 (12:16 -0800)
commite0a0e913c7b340e756a6728226eb5c638f76be05
tree99cf7c8990aa818d848a8179257e48fcf595b1b6
parent9d9ed61c5a97562b93a2326f33922783ed509d47
path: refactor normalizeArray()

The normalizeArray() function now avoids using the slow Array#splice()
method to improve performance and now also filters out empty path parts.

Code that pre-filtered empty parts has been removed.

PR-URL: https://github.com/joyent/node/pull/8724
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
lib/path.js