 
 
 
-  # 
+  #
   Handlebars.registerHelper 'eachIndex', (array, options) ->
       result = ''
       for value, index in array

module.exports.register = (Handlebars, options) ->

  # Local deps
  Utils = require '../utils/utils'


  # First: Returns the first item in a collection.
  Handlebars.registerHelper 'first', (array, count) ->
      if Utils.isUndefined(count) then array[0] else array.slice 0, count


  # With first: Use the first item in a collection inside a block.
  Handlebars.registerHelper 'withFirst', (array, count, options) ->

  #
  # Use with arrays:
  # {{join jobs delimiter=", " start="1" end="2"}}
  #
  # Handlebars.registerHelper "join", (items, block) ->
  #   delimiter = block.hash.delimiter or ","
  #   start = start = block.hash.start or 0
