 
 i18n = window.i18n =
 
+  # Public functions
+  # ----------------
+
   # Internationalize the specified attribute of all the selected elements.
   attribute: (selector, attribute, value, subs) ->
     elements = document.querySelectorAll selector

      str += repeatStr for i in [1..count] if count > 0
      # Repeat to the left if `count` is negative.
      str = repeatStr + str for i in [1..count*-1] if count < 0
    str

log = window.log =

  # Public constants
  # ----------------

  # Error logging level.
  ERROR: 50

  # Debug logging level.
  DEBUG: 30

  # Information logging level.
  INFORMATION: 20

  # Trace logging level.
  TRACE: 10

  # Warning logging level.
  WARNING: 40

  # Public functions
  # ----------------

  # Output all failed `assertions`.
  assert: (assertions...) ->
    console.assert assertion for assertion in assertions if @logger.assertions

  # Create/increment a counter and output its current count for all `names`.
  count: (names...) ->
    console.count name for name in names if canLog @DEBUG

  # Output all debug `entries`.
  debug: (entries...) ->
    console.debug entry for entry in entries if canLog @DEBUG

  # Display an interactive listing of the properties of all `entries`.
  dir: (entries...) ->
    console.dir entry for entry in entries if canLog @DEBUG

  # Output all error `entries`.
  error: (entries...) ->
    console.error entry for entry in entries if canLog @ERROR

  # Output all informative `entries`.
  info: (entries...) ->
    console.info entry for entry in entries if canLog @INFORMATION

  # Hold the information for the current state of the logger.
  logger: {}

  # Output all general `entries`.
  out: (entries...) ->
    console.log entry for entry in entries if @logger.enabled

  # Start a timer for all `names`.
  time: (names...) ->
    console.time name for name in names if canLog @DEBUG

  # Stop a timer and output its elapsed time in milliseconds for all `names`.
  timeEnd: (names...) ->
    console.timeEnd name for name in names if canLog @DEBUG

  # Output a stack trace.
  trace: ->
    console.trace() if @canLog @TRACE

  # Output all warning `entries`.
  warn: (entries...) ->
    console.warn entry for entry in entries if canLog @WARNING

# Storage setup
# -------------

store = window.store =

  # Public functions
  # ----------------

  # Clear all keys from `localStorage`.
  clear: ->
