Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: minor refactoring #1870

Closed
wants to merge 5 commits into from
Closed

Commits on Jun 2, 2015

  1. fs: better error messages

    1. Changing `Bad arguments` error messages to a more helpful message
    `options should either be an object or a string`.
    
    2. Made braces consistent.
    
    3. Returning meaningful error message from `fs_event_wrap`'s
    `FSEvent`'s `Start` function.
    thefourtheye committed Jun 2, 2015
    Configuration menu
    Copy the full SHA
    a087ed9 View commit details
    Browse the repository at this point in the history
  2. fs: removing unnecessary nullCheckCallNT

    `nullCheckCallNT` function is not necessary, as we can directly pass
    `callback` and `er` to `process.nextTick`
    thefourtheye committed Jun 2, 2015
    Configuration menu
    Copy the full SHA
    f53c082 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2015

  1. fs: Removing inStatWatchers & using Map for lookup

    We are getting rid of `inStatWatchers` function and making
    `statWatchers` a `Map`.
    thefourtheye committed Jun 11, 2015
    Configuration menu
    Copy the full SHA
    73d011e View commit details
    Browse the repository at this point in the history
  2. fs: minor refactoring

    1. Removed a few unnecessary variables to reduce LoC
    
    2. Removed redundant `var` definitions of variables in same function
    
    3. Refactored variables which are defined inside a block and used
    outside as well
    
    4. Refactored effect-less code
    
    5. In `rethrow` function, instead of assigning to `err` and throwing
    `err`, we can directly throw `backtrace` object itself.
    
    6. Reassigning a defined parameter while also mentioning arguments in
    the body is one of the optimization killers. So, changing `callback` to
    `callback_` and declaring a new variable called `callback` in the body.
    thefourtheye committed Jun 11, 2015
    Configuration menu
    Copy the full SHA
    08f2691 View commit details
    Browse the repository at this point in the history
  3. fs: Making SyncWriteStream non-enumerable

    As `SyncWriteStream` is only for internal use, it would be better
    if it is non-enumerable, so that a simple `console.log(require('fs'))`
    will not reveal it.
    thefourtheye committed Jun 11, 2015
    Configuration menu
    Copy the full SHA
    365bc72 View commit details
    Browse the repository at this point in the history