Skip to content

Commit dd16274

Browse files
Update code-builder.js
1 parent 621d89b commit dd16274

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/helpers/code-builder.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
var util = require('util')
3+
const util = require('util')
44

55
/**
66
* Helper object to format and aggragate lines of code.
@@ -11,7 +11,7 @@ var util = require('util')
1111
* @param {string} indentation Desired indentation character for aggregated lines of code
1212
* @param {string} join Desired character to join each line of code
1313
*/
14-
var CodeBuilder = function (indentation, join) {
14+
const CodeBuilder = function (indentation, join) {
1515
this.code = []
1616
this.indentation = indentation
1717
this.lineJoin = join || '\n'
@@ -37,8 +37,8 @@ var CodeBuilder = function (indentation, join) {
3737
* // returns: 'console.log("\t\thello world")'
3838
*/
3939
CodeBuilder.prototype.buildLine = function (indentationLevel, line) {
40-
var lineIndentation = ''
41-
var slice = 2
40+
let lineIndentation = ''
41+
let slice = 2
4242
if (Object.prototype.toString.call(indentationLevel) === '[object String]') {
4343
slice = 1
4444
line = indentationLevel
@@ -52,7 +52,7 @@ CodeBuilder.prototype.buildLine = function (indentationLevel, line) {
5252
indentationLevel--
5353
}
5454

55-
var format = Array.prototype.slice.call(arguments, slice, arguments.length)
55+
let format = Array.prototype.slice.call(arguments, slice, arguments.length)
5656
format.unshift(lineIndentation + line)
5757

5858
return util.format.apply(this, format)

0 commit comments

Comments
 (0)