Sha256: 3ef94088d324ebe037b4b9a8b6187426f89953b0a5884ea5f9904f6868b71348

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

angular.module("SWAT").factory "SwatHelpers", ($sce)->
  Helpers =
    formatTime: (seconds) ->
      hh = Math.floor(seconds / 3600)
      mm = Math.floor(seconds / 60) % 60
      ss = Math.floor(seconds) % 60
      (if hh then (if hh < 10 then '0' else '') + hh + ':' else '') + (if mm < 10 and hh then '0' else '') + mm + ':' + (if ss < 10 then '0' else '') + ss

    isSpecTraceLine: (line)->
      _.include(line, '/spec/')

    isEmpty: (string)->
      _.isEmpty(string)

    renderHtml: (htmlCode)->
      $sce.trustAsHtml(htmlCode)


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sw2at-ui-0.0.16 app/assets/javascripts/swat/app/factories/helpers.coffee
sw2at-ui-0.0.15 app/assets/javascripts/swat/app/factories/helpers.coffee
sw2at-ui-0.0.14 app/assets/javascripts/swat/app/factories/helpers.coffee