1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-07-04 09:21:05 +01:00

chore: decaffeinate: convert error.coffee and 58 other files to JS

This commit is contained in:
decaffeinate
2018-02-13 20:43:42 -05:00
committed by hacksalot
parent b7cd01597e
commit 8a46d642e5
59 changed files with 4568 additions and 3676 deletions

View File

@ -1,31 +1,40 @@
###*
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
/**
Definition of the JsonYamlGenerator class.
@module generators/json-yaml-generator
@license MIT. See LICENSE.md for details.
###
*/
BaseGenerator = require('./base-generator')
FS = require('fs')
YAML = require('yamljs')
let JsonYamlGenerator;
const BaseGenerator = require('./base-generator');
const FS = require('fs');
const YAML = require('yamljs');
###*
/**
JsonYamlGenerator takes a JSON resume object and translates it directly to
JSON without a template, producing an equivalent YAML-formatted resume. See
also YamlGenerator (yaml-generator.js).
###
*/
module.exports = class JsonYamlGenerator extends BaseGenerator
module.exports = (JsonYamlGenerator = class JsonYamlGenerator extends BaseGenerator {
constructor: () -> super 'yml'
constructor() { super('yml'); }
invoke: ( rez, themeMarkup, cssInfo, opts ) ->
YAML.stringify JSON.parse( rez.stringify() ), Infinity, 2
invoke( rez, themeMarkup, cssInfo, opts ) {
return YAML.stringify(JSON.parse( rez.stringify() ), Infinity, 2);
}
generate: ( rez, f, opts ) ->
data = YAML.stringify JSON.parse( rez.stringify() ), Infinity, 2
FS.writeFileSync f, data, 'utf8'
data
generate( rez, f, opts ) {
const data = YAML.stringify(JSON.parse( rez.stringify() ), Infinity, 2);
FS.writeFileSync(f, data, 'utf8');
return data;
}
});