Skip to content

Commit

Permalink
Clean up lint violations.
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffano committed Apr 27, 2012
1 parent 0b854be commit 0e4a91a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ function Writer() {
function gen(templates, numSegments, params, outFile, cb) {
var stream = fs.createWriteStream(outFile,
{ flags: 'w', encoding: 'utf-8' }),
segmentId = 0,
segment;
segmentId = 0;

stream.on('error', function (err) {
console.error('Error: ' + err);
Expand All @@ -19,8 +18,8 @@ function Writer() {

stream.write(templates.header);

while (segmentId++ < numSegments) {
segment = templates.segment;
function _writeSegment(segmentId) {
var segment = templates.segment;
params.segment_id = segmentId;

function _apply(param) {
Expand All @@ -31,6 +30,10 @@ function Writer() {
stream.write(segment);
}

while (segmentId++ < numSegments) {
_writeSegment(segmentId);
}

stream.end(templates.footer);
}

Expand Down

0 comments on commit 0e4a91a

Please sign in to comment.