"use strict";

import utils from "./modules/utils";
import asEnumerable from "./modules/asEnumerable";
import toArray from "./modules/toArray";
import where from "./modules/where";
import take from "./modules/take";
import select from "./modules/select";
import orderBy from "./modules/orderBy";
import orderByDescending from "./modules/orderByDescending";
import concat from "./modules/concat";
import range from "./modules/range";
import empty from "./modules/empty";
import repeat from "./modules/repeat";
import count from "./modules/count";
import first from "./modules/first";
import firstOrDefault from "./modules/firstOrDefault";
import last from "./modules/last";
import lastOrDefault from "./modules/lastOrDefault";
import single from "./modules/single";
import singleOrDefault from "./modules/singleOrDefault";
import any from "./modules/any.js";
import all from "./modules/all.js";
import defaultIfEmpty from "./modules/defaultIfEmpty.js";

function setPrototype(prototype) {
  //prototype.asEnumerable = asEnumerable;
  prototype.toArray = toArray;
  prototype.where = where;
  prototype.take = take;
  prototype.select = select;
  prototype.orderBy = orderBy;
  prototype.orderByDescending = orderByDescending;
  prototype.concat = concat;
  prototype.count = count;
  prototype.first = first;
  prototype.firstOrDefault = firstOrDefault;
  prototype.last = last;
  prototype.lastOrDefault = lastOrDefault;
  prototype.single = single;
  prototype.singleOrDefault = singleOrDefault;
  prototype.any = any;
  prototype.all = all;
  prototype.defaultIfEmpty = defaultIfEmpty;
}

export default function () {
  //setPrototype(Array.prototype);
  setPrototype(utils.GeneratorFunctionProto);
  setPrototype(utils.GeneratorFunctionPrototype);

  Array.prototype.asEnumerable = asEnumerable;
}

@@ -845,19 +845,16 @@
 ules/any
-.js
 %22;%0Aimpor
@@ -878,19 +878,16 @@
 ules/all
-.js
 %22;%0Aimpor
@@ -937,11 +937,8 @@
 mpty
-.js
 %22;%0A%0A

correct linqjs js extension