This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
path: refactor for performance and consistency
Improve performance by: + Not running the same code twice (in win32.resolve and .normalize) + Not leaking the `arguments` object! + Getting the last character of a string by index, instead of with `.substr()` Improve code consistency by: + Using `[]` instead of `.charAt()` where possible + Using a function declaration instead of a var declaration + Using .slice() instead of .substr() + Standardizing getting certain path statistics with the new `win23StatPath()` function Improve both by: + Making the reusable `trimArray()` function + Using `.slice()` with clearer arguments
- Loading branch information
Showing
1 changed file
with
67 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters