From 94fc54174cdc201804de247e2b8f701ac2efba30 Mon Sep 17 00:00:00 2001 From: hacksalot Date: Wed, 31 Jan 2018 16:17:46 -0500 Subject: [PATCH] refactor: remove unnecessary var --- dist/core/resume-factory.js | 5 ++--- src/core/resume-factory.coffee | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dist/core/resume-factory.js b/dist/core/resume-factory.js index ca11c95..da5fd3e 100644 --- a/dist/core/resume-factory.js +++ b/dist/core/resume-factory.js @@ -56,9 +56,8 @@ Definition of the ResumeFactory class. /** Load a single resume from disk. */ loadOne: function(src, opts, emitter) { - var ResumeClass, info, json, objectify, orgFormat, reqLib, rez, toFormat; + var ResumeClass, info, json, orgFormat, reqLib, rez, toFormat; toFormat = opts.format; - objectify = opts.objectify; toFormat && (toFormat = toFormat.toLowerCase().trim()); info = _parse(src, opts, emitter); if (info.fluenterror) { @@ -74,7 +73,7 @@ Definition of the ResumeFactory class. json = ResumeConverter['to' + toFormat.toUpperCase()](json); } rez = null; - if (objectify) { + if (opts.objectify) { reqLib = '../core/' + (toFormat || orgFormat) + '-resume'; ResumeClass = require(reqLib); rez = new ResumeClass().parseJSON(json, opts.inner); diff --git a/src/core/resume-factory.coffee b/src/core/resume-factory.coffee index 328c74a..24b4fae 100644 --- a/src/core/resume-factory.coffee +++ b/src/core/resume-factory.coffee @@ -52,7 +52,6 @@ ResumeFactory = module.exports = loadOne: ( src, opts, emitter ) -> toFormat = opts.format # Can be null - objectify = opts.objectify # Get the destination format. Can be 'fresh', 'jrs', or null/undefined. toFormat && (toFormat = toFormat.toLowerCase().trim()) @@ -75,7 +74,7 @@ ResumeFactory = module.exports = # Objectify the resume, that is, convert it from JSON to a FRESHResume # or JRSResume object. rez = null - if objectify + if opts.objectify reqLib = '../core/' + (toFormat || orgFormat) + '-resume' ResumeClass = require reqLib rez = new ResumeClass().parseJSON( json, opts.inner )