• Solly Ross's avatar
    Cleanup: Util code · d21cd6c1
    Solly Ross authored
    File: util.js
    Tests Added: True (partial -- for logging and array push methods)
    Changes:
    - Fixed JSHint Errors (indentation, semicolons, global "use strict")
    - Made browser detection methods more readable
    - added some newline characters when appropriate for readability
    - throw Errors not strings!
    - Removed conf_defaults, and added make_properties and set_defaults
      instead (see below)
    
    The removal of conf_defaults and switch to make_properties and
    set_defaults is to facilitate the switch over to normal Javascript
    constructors instead of Crockford-style constructors.  Now, methods
    are added to the objects prototype (and thus make properties is called
    outside the constructor).
    d21cd6c1
test.util.js 3.8 KB