• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bigeasy / inquiry / 116
100%

Build:
DEFAULT BRANCH: master
Ran 18 Jul 2013 02:49AM UTC
Jobs 2
Files 1
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
116

push

travis-ci

bigeasy
Remove unnecessary variable.

Remove a variable that simply mirrors a function parameter for a gain of
5 bytes.

An easy way to get save space is to look for variables that can be
reused. I like to use the `$` variable to accpet the return value of a
regular expression because it makes me think of Perl. Thoughts Perl
makes me happy, so I like to think of Perl. It also means that I get to
reuse the `$` variable. To me it always means the values of the last
regular expression that was run.

When I want to minzip further, I look for other candidates for variable
reuse. Did I declare `i`, `j`, and `k`, when the loops are subsequent
and not nested? If so, then just reuse `i`.

This is going to anger some nerds who believe that a variable is sacred
and exists to serve only one purpose. Obviously, the objectives here are
not in line with the objectives of that princple. This is a trade off
and I'm trading clarity for bytes.

However, you can make be verbose in your local variable naming, because
they get rewritten by the minifier anyway. If you wanted to use a
variable for a "counter", then for "loop limit", name it
`counterThenLoopLimit`. It might help you remember that the variable is
reused.

See #46.

File                             Raw         Min         Zip     Min/Zip
index.js                  5674/05.54  2121/02.07  1872/01.83  1016/00.99

81 of 81 relevant lines covered (100.0%)

342.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 116.1 18 Jul 2013 02:49AM UTC 0
100.0
Travis Job 116.1
2 116.2 18 Jul 2013 02:49AM UTC 0
100.0
Travis Job 116.2
Source Files on build 116
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #116
  • c7b11f6f on github
  • Prev Build on master (#115)
  • Next Build on master (#117)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc