Skip to content

Commit

Permalink
remove redundant index field
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim de Beer committed May 25, 2016
1 parent 8fc6d9a commit 2807747
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ exports.parse = function (stamp) {

exports.src = function (stamp) {
if (typeof stamp === 'string') {
let index
for (let i = 1, len = stamp.length - 1; i < len; i++) {
if (stamp.charAt(i) === '|') {
index = i
return stamp.slice(0, index)
return stamp.slice(0, i)
}
}
}
Expand Down

0 comments on commit 2807747

Please sign in to comment.