1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-03 08:51:05 +01:00
This commit is contained in:
hacksalot
2016-01-18 00:34:57 -05:00
parent c9e45d4991
commit 712cba57b8
17 changed files with 122 additions and 229 deletions

View File

@ -41,7 +41,7 @@ Definition of the FRESHResume class.
FreshResume.prototype.open = function( file, opts ) {
var raw = FS.readFileSync( file, 'utf8' );
var ret = this.parse( raw, opts );
this.imp.fileName = file;
this.imp.file = file;
return ret;
};
@ -100,8 +100,8 @@ Definition of the FRESHResume class.
Save the sheet to disk (for environments that have disk access).
*/
FreshResume.prototype.save = function( filename ) {
this.imp.fileName = filename || this.imp.fileName;
FS.writeFileSync( this.imp.fileName, this.stringify(), 'utf8' );
this.imp.file = filename || this.imp.file;
FS.writeFileSync( this.imp.file, this.stringify(), 'utf8' );
return this;
};
@ -113,8 +113,8 @@ Definition of the FRESHResume class.
FreshResume.prototype.saveAs = function( filename, format ) {
if( format !== 'JRS' ) {
this.imp.fileName = filename || this.imp.fileName;
FS.writeFileSync( this.imp.fileName, this.stringify(), 'utf8' );
this.imp.file = filename || this.imp.file;
FS.writeFileSync( this.imp.file, this.stringify(), 'utf8' );
}
else {
var newRep = CONVERTER.toJRS( this );