mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-25 09:50:11 +00:00
refactor: remove unnecessary var
This commit is contained in:
parent
231357badc
commit
94fc54174c
5
dist/core/resume-factory.js
vendored
5
dist/core/resume-factory.js
vendored
@ -56,9 +56,8 @@ Definition of the ResumeFactory class.
|
|||||||
|
|
||||||
/** Load a single resume from disk. */
|
/** Load a single resume from disk. */
|
||||||
loadOne: function(src, opts, emitter) {
|
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;
|
toFormat = opts.format;
|
||||||
objectify = opts.objectify;
|
|
||||||
toFormat && (toFormat = toFormat.toLowerCase().trim());
|
toFormat && (toFormat = toFormat.toLowerCase().trim());
|
||||||
info = _parse(src, opts, emitter);
|
info = _parse(src, opts, emitter);
|
||||||
if (info.fluenterror) {
|
if (info.fluenterror) {
|
||||||
@ -74,7 +73,7 @@ Definition of the ResumeFactory class.
|
|||||||
json = ResumeConverter['to' + toFormat.toUpperCase()](json);
|
json = ResumeConverter['to' + toFormat.toUpperCase()](json);
|
||||||
}
|
}
|
||||||
rez = null;
|
rez = null;
|
||||||
if (objectify) {
|
if (opts.objectify) {
|
||||||
reqLib = '../core/' + (toFormat || orgFormat) + '-resume';
|
reqLib = '../core/' + (toFormat || orgFormat) + '-resume';
|
||||||
ResumeClass = require(reqLib);
|
ResumeClass = require(reqLib);
|
||||||
rez = new ResumeClass().parseJSON(json, opts.inner);
|
rez = new ResumeClass().parseJSON(json, opts.inner);
|
||||||
|
@ -52,7 +52,6 @@ ResumeFactory = module.exports =
|
|||||||
loadOne: ( src, opts, emitter ) ->
|
loadOne: ( src, opts, emitter ) ->
|
||||||
|
|
||||||
toFormat = opts.format # Can be null
|
toFormat = opts.format # Can be null
|
||||||
objectify = opts.objectify
|
|
||||||
|
|
||||||
# Get the destination format. Can be 'fresh', 'jrs', or null/undefined.
|
# Get the destination format. Can be 'fresh', 'jrs', or null/undefined.
|
||||||
toFormat && (toFormat = toFormat.toLowerCase().trim())
|
toFormat && (toFormat = toFormat.toLowerCase().trim())
|
||||||
@ -75,7 +74,7 @@ ResumeFactory = module.exports =
|
|||||||
# Objectify the resume, that is, convert it from JSON to a FRESHResume
|
# Objectify the resume, that is, convert it from JSON to a FRESHResume
|
||||||
# or JRSResume object.
|
# or JRSResume object.
|
||||||
rez = null
|
rez = null
|
||||||
if objectify
|
if opts.objectify
|
||||||
reqLib = '../core/' + (toFormat || orgFormat) + '-resume'
|
reqLib = '../core/' + (toFormat || orgFormat) + '-resume'
|
||||||
ResumeClass = require reqLib
|
ResumeClass = require reqLib
|
||||||
rez = new ResumeClass().parseJSON( json, opts.inner )
|
rez = new ResumeClass().parseJSON( json, opts.inner )
|
||||||
|
Loading…
Reference in New Issue
Block a user