jquery.tablesorter: Minor coding style cleanup and DRY
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 20 Oct 2015 00:45:07 +0000 (01:45 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 20 Oct 2015 00:59:29 +0000 (01:59 +0100)
commitaacb850dd3187da39b4bd3d69f64e538a1babeca
treec9b044a93e04222d7bd6acedbb6a2d565442c90d
parent9f04548ea98aa36f65b3c397e9834c02dce5b0c2
jquery.tablesorter: Minor coding style cleanup and DRY

* Consistently name 'length' cached variables 'len' (e.g. not 'l').

* Fix invalid documentation syntax for convertSortList().
  (Build is passing because this file is not yet indexed.)

* Remove redundant 'len' variable from pure JavaScript arrays where
  iterations can't change the length. Caching the length is a dated
  practice meant to micro-optimise execution time. For the moment,
  kept any loops with complex iteration bodies as-is, as well as loops
  over structures that are not pure arrays (e.g. NodeList objects).

* Use getParserById() in addParser() instead of duplicating its logic.

Change-Id: I566eff6efd97b5d9672277bacb4cb2b501f4625f
resources/src/jquery/jquery.tablesorter.js