Skip to content

Commit

Permalink
Refactored version code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Apr 9, 2017
1 parent c7b70fd commit 0719993
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/faker/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ export function name() {
}

export function version() {
const version = itemFromCollection(VERSION_FORMATS);
return version.split('.').map(i => {
if (i =='#') {
return randomNumber(0, 10);
}
return i;
}).join('.');
return itemFromCollection(VERSION_FORMATS)
.split('.')
.map(i => i =='#' ? randomNumber(0, 10) : i)
.join('.');
}

export function author() {
Expand Down

0 comments on commit 0719993

Please sign in to comment.