Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

path: refactor for performance and consistency #9289

Closed
wants to merge 1 commit into from

Commits on Mar 25, 2015

  1. path: refactor for performance and consistency

    Improve performance by:
    + Not leaking the `arguments` object!
    + Getting the last character of a string by index, instead of
      with `.substr()` or `.slice()`
    
    Improve code consistency by:
    + Using `[]` instead of `.charAt()` where possible
    + Using a function declaration instead of a var declaration
    + Using `.slice()` with clearer arguments
    + Checking if `dir` is truthy in `win32.format`
      (added tests for this)
    
    Improve both by:
    + Making the reusable `trimArray()` function
    + Standardizing getting certain path statistics with
      the new `win32StatPath()` function
    nwoltman committed Mar 25, 2015
    Configuration menu
    Copy the full SHA
    6eed25b View commit details
    Browse the repository at this point in the history