'use strict';

var Filter = require('broccoli-filter');
var LiveScript = require('LiveScript');
var objectAssign = require('object-assign');

function LiveScriptFilter(inputTree, options) {
  if (!(this instanceof LiveScriptFilter)) {
    return new LiveScriptFilter(inputTree, options);
  }

  this.inputTree = inputTree;
  this.options = options || {};
}

LiveScriptFilter.prototype = Object.create(Filter.prototype);
LiveScriptFilter.prototype.constructor = LiveScriptFilter;

LiveScriptFilter.prototype.extensions = ['ls'];
LiveScriptFilter.prototype.targetExtension = 'js';

LiveScriptFilter.prototype.processString = function(str) {
  // LiveScript overwrites the option object.
  return LiveScript.compile(str, objectAssign({}, this.options));
};

module.exports = LiveScriptFilter;

@@ -8,19 +8,21 @@
 rict';%0A%0A
-var
+const
  Filter 
@@ -51,19 +51,21 @@
 lter');%0A
-var
+const
  LiveScr
@@ -96,53 +96,8 @@
 t');
-%0Avar objectAssign = require('object-assign');
 %0A%0Afu
@@ -674,15 +674,16 @@
 tr, 
-o
+O
 bject
-A
+.a
 ssig

use `const` and Object.assign()