Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Make changes needed to compile on CoffeeScript 2 #32

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
393 changes: 203 additions & 190 deletions lib/composer.js

Large diffs are not rendered by default.

936 changes: 469 additions & 467 deletions lib/constructor.js

Large diffs are not rendered by default.

47 changes: 17 additions & 30 deletions lib/dumper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(function() {
var emitter, representer, resolver, serializer, util,
slice = [].slice;
var emitter, representer, resolver, serializer, util;

util = require('./util');

Expand All @@ -12,46 +11,34 @@

resolver = require('./resolver');

this.make_dumper = function(Emitter, Serializer, Representer, Resolver) {
this.make_dumper = function(Emitter = emitter.Emitter, Serializer = serializer.Serializer, Representer = representer.Representer, Resolver = resolver.Resolver) {
var Dumper, components;
if (Emitter == null) {
Emitter = emitter.Emitter;
}
if (Serializer == null) {
Serializer = serializer.Serializer;
}
if (Representer == null) {
Representer = representer.Representer;
}
if (Resolver == null) {
Resolver = resolver.Resolver;
}
components = [Emitter, Serializer, Representer, Resolver];
return Dumper = (function() {
var component;

util.extend.apply(util, [Dumper.prototype].concat(slice.call((function() {
class Dumper {
constructor(stream, options = {}) {
var i, len, ref;
components[0].prototype.initialise.call(this, stream, options);
ref = components.slice(1);
for (i = 0, len = ref.length; i < len; i++) {
component = ref[i];
component.prototype.initialise.call(this, options);
}
}

};

util.extend(Dumper.prototype, ...(function() {
var i, len, results;
results = [];
for (i = 0, len = components.length; i < len; i++) {
component = components[i];
results.push(component.prototype);
}
return results;
})())));

function Dumper(stream, options) {
var i, len, ref;
if (options == null) {
options = {};
}
components[0].call(this, stream, options);
ref = components.slice(1);
for (i = 0, len = ref.length; i < len; i++) {
component = ref[i];
component.call(this, options);
}
}
})());

return Dumper;

Expand Down
Loading