Sha256: d84057a8933d51460c1121ee33916527a8b321ee9d331c707fb38e8e9a1e44d1

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

Handlebars.registerHelper "selected", (selected) ->
  return if selected then "checked" else ""

Handlebars.registerHelper "truncate", (text, length) ->
  truncated = text.substring(0, length)
  if text.length > length
    truncated = truncated + "..."
  return truncated

Handlebars.registerHelper "strip", (text) ->
  return text.toString().replace(/^\s\s*/, '').replace(/\s\s*$/, '')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sensu-dashboard-0.10.1 lib/sensu-dashboard/assets/javascripts/handlebars_helpers.coffee