Skip to content

Commit

Permalink
Add repeat polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 29, 2016
1 parent 2e29c7f commit b2a3337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Default.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ humanizeMs = require 'ms'
chalk = require 'chalk'
formatUtil = require './Format'
CONST = require './Constants'
repeat = require 'repeat-string'

module.exports =
print: ->
Expand All @@ -13,7 +14,7 @@ module.exports =
decorateCounter: (counter) ->
str = '' + counter
n = CONST.DECORATE_COUNTER_ZERO_N - str.length
return '0'.repeat(n) + str if n > 0
return repeat('0', n) + str if n > 0
str

outputMessage: (message) -> message
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"chalk": "~1.1.1",
"coffee-script": "~1.10.0",
"existential-default": "~1.1.1",
"ms": "~0.7.1"
"ms": "~0.7.1",
"repeat-string": "~1.5.4"
},
"devDependencies": {
"browserify": "latest",
Expand Down

0 comments on commit b2a3337

Please sign in to comment.