Files
ember-cli-dunlop/addon/utils/get-max-suffix.coffee
T
2017-12-21 11:42:41 +01:00

11 lines
286 B
CoffeeScript

getMaxSuffix = (array) ->
max = 0
return 0 unless array
array.forEach (element)->
return unless element
max = Math.max(match[0], max) if match = String(element).match /\d+$/
max
window.get_max_suffix = getMaxSuffix # make globally available
export default getMaxSuffix