mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-22 08:20:11 +00:00
Cleanup.
This commit is contained in:
parent
aa58edd853
commit
c54137a493
33
src/sheet.js
33
src/sheet.js
@ -1,21 +1,26 @@
|
|||||||
|
/**
|
||||||
|
Abstract character/resume sheet representation.
|
||||||
|
@license Copyright (c) 2015 by James M. Devlin. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var FS = require('fs');
|
var FS = require('fs');
|
||||||
|
|
||||||
function Sheet() {
|
function Sheet() {
|
||||||
|
this.id = null;
|
||||||
|
this.title = "New";
|
||||||
|
this.rep = { };
|
||||||
|
this.fileName = null;
|
||||||
|
}
|
||||||
|
|
||||||
this.id = null;
|
Sheet.prototype.open = function( file, title ) {
|
||||||
this.title = "";
|
this.rep = JSON.parse( FS.readFileSync( file, 'utf8' ) );
|
||||||
this.sheets = [];
|
this.fileName = file;
|
||||||
this.rep = { };
|
this.title = title || this.rep.basics.name;
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
module.exports = Sheet;
|
||||||
|
|
||||||
Sheet.prototype.open = function( file ) {
|
|
||||||
this.rep = JSON.parse( FS.readFileSync( file, 'utf8' ) );
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = Sheet;
|
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
Loading…
Reference in New Issue
Block a user