Skip to content

Commit

Permalink
recurse with occurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Dec 3, 2018
1 parent 34f69d4 commit 9e1c41d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ BananaSlug.prototype.slug = function (value, maintainCase) {
self.occurrences[slug] = occurrences

if (occurrences) {
slug = slug + '-' + occurrences
self.occurrences[slug] = 0
slug = self.slug(slug + '-' + occurrences, maintainCase)
}

return slug
Expand Down

0 comments on commit 9e1c41d

Please sign in to comment.