clarketm / TableExport

The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
https://tableexport.travismclarke.com/
Apache License 2.0
888 stars 289 forks source link

processCols and processRows as Array enumerable properties #126

Open jessicabarbalho opened 6 years ago

jessicabarbalho commented 6 years ago

Those methods are defined in the Array prototype. When I need to go over an array from my project those values are retrieved together with my expected items, occasioning problems for me. Maybe you should use Object.defineProperty to write those methods and set enumerable as false.

Object.defineProperty(Array.prototype, "contains", {
  enumerable: false,
  value: function<T>(item: T): boolean {
    return this.indexOf(item) >= 0
  }
});