One Object

  • Declare all methods and constants as properties of a global library object
  • Pros
    • Less chance of problems with unique naming
    • The user knows when the library is being used
    • The developer tools make it easier to see what functions / constants are included
  • Cons
    • The user needs to type more
    • Needs to load the whole library at once

7 / 24