diff --git a/lib/Format.js b/lib/Format.js index 9c88045..54d9e33 100644 --- a/lib/Format.js +++ b/lib/Format.js @@ -20,7 +20,7 @@ const isFalsy = value => [null, undefined, false].indexOf(value) !== -1 const isArray = arr => Array.isArray(arr) const hasWhiteSpace = s => s.indexOf(' ') !== -1 -const prettyObj = function (obj, color, opts) { +function prettyObj (obj, color, opts) { const lineColor = getColor(CONST.LINE_COLOR) const { offset, depth } = opts @@ -39,7 +39,7 @@ const prettyObj = function (obj, color, opts) { return fmtObj(obj, depth) } -var serialize = function (obj, color, key) { +function serialize (obj, color, key) { // symbols cannot be directly casted to strings if (isSymbol(key)) key = key.toString() if (isSymbol(obj)) obj = obj.toString() @@ -89,8 +89,8 @@ var serialize = function (obj, color, key) { return msg } -const format = opts => - function (messages) { +const createFormat = opts => + function format (messages) { const args = slice(arguments, 1) const color = args.pop() @@ -131,4 +131,4 @@ const format = opts => return serialize(messages, color) } -module.exports = format +module.exports = createFormat