From 2dd904958253a3f138b7613d50fcbb9fa69abd43 Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Sat, 6 Jan 2018 15:13:22 -0500 Subject: [PATCH] helpders.js: Run prettier. --- pkg/js/helpers.js | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/pkg/js/helpers.js b/pkg/js/helpers.js index 9580d3cc8..62aa09535 100644 --- a/pkg/js/helpers.js +++ b/pkg/js/helpers.js @@ -221,30 +221,30 @@ var TLSA = recordBuilder('TLSA', { }); function isStringOrArray(x) { - return _.isString(x) || _.isArray(x); + return _.isString(x) || _.isArray(x); } // TXT(name,target, recordModifiers...) -var TXT = recordBuilder("TXT", { - args: [["name", _.isString], ["target", isStringOrArray]], - transform: function(record, args, modifiers) { - record.name = args.name; - // Store the strings twice: - // .target is the first string - // .txtstrings is the individual strings. - // NOTE: If there are more than 1 string, providers should only access - // .txtstrings, thus it doesn't matter what we store in .target. - // However, by storing the first string there, it improves backwards - // compatibility when the len(array) == 1 and (intentionally) breaks - // broken providers early in the integration tests. - if (_.isString(args.target)) { - record.target = args.target; - record.txtstrings = [args.target]; - } else { - record.target = args.target[0] - record.txtstrings = args.target; - } - } +var TXT = recordBuilder('TXT', { + args: [['name', _.isString], ['target', isStringOrArray]], + transform: function(record, args, modifiers) { + record.name = args.name; + // Store the strings twice: + // .target is the first string + // .txtstrings is the individual strings. + // NOTE: If there are more than 1 string, providers should only access + // .txtstrings, thus it doesn't matter what we store in .target. + // However, by storing the first string there, it improves backwards + // compatibility when the len(array) == 1 and (intentionally) breaks + // broken providers early in the integration tests. + if (_.isString(args.target)) { + record.target = args.target; + record.txtstrings = [args.target]; + } else { + record.target = args.target[0]; + record.txtstrings = args.target; + } + }, }); // MX(name,priority,target, recordModifiers...) @@ -604,9 +604,9 @@ function SPF_BUILDER(value) { // Split a DKIM string if it is >254 bytes. function DKIM(arr) { - chunkSize = 255; - var R = []; - for (var i = 0, len = arr.length; i < len; i += chunkSize) - R.push(arr.slice(i, i + chunkSize)); - return R; + chunkSize = 255; + var R = []; + for (var i = 0, len = arr.length; i < len; i += chunkSize) + R.push(arr.slice(i, i + chunkSize)); + return R; }