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

Commit

Permalink
v5.0.2 - replace Array.prototype with Object.defineProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed May 25, 2018
1 parent 261ca0f commit a18b724
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 34 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ $ npm install tableexport
#### [CDNjs](https://cdnjs.com/libraries/TableExport)
| | uncompressed | compressed |
| :------: | :----------: | :--------: |
| __CSS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/css/tableexport.css) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/css/tableexport.min.css) |
| __JS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/js/tableexport.js) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/js/tableexport.min.js) |
| __Images__ | &mdash; | [🔗<sup>xlsx</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/img/xlsx.svg)[🔗<sup>xls</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/img/xls.svg)[🔗<sup>csv</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/img/csv.svg)[🔗<sup>txt</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.1/img/txt.svg) |
| __CSS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/css/tableexport.css) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/css/tableexport.min.css) |
| __JS__ | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/js/tableexport.js) | [🔗](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/js/tableexport.min.js) |
| __Images__ | &mdash; | [🔗<sup>xlsx</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/img/xlsx.svg)[🔗<sup>xls</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/img/xls.svg)[🔗<sup>csv</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/img/csv.svg)[🔗<sup>txt</sup>](https://cdnjs.cloudflare.com/ajax/libs/TableExport/5.0.2/img/txt.svg) |


#### [unpkg](https://unpkg.com/#/)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport.js",
"version": "5.0.1",
"version": "5.0.2",
"authors": [
"clarketm <travis.m.clarke@gmail.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down
16 changes: 8 additions & 8 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down Expand Up @@ -148,7 +148,7 @@
* Version.
* @memberof TableExport.prototype
*/
version: '5.0.1',
version: '5.0.2',
/**
* Default library options.
* @memberof TableExport.prototype
Expand Down Expand Up @@ -962,24 +962,24 @@
return TableExport.prototype.CONSTANTS.TYPE;
})();

Object.defineProperty(Array.prototype, "processRows", {
Object.defineProperty(Array.prototype, 'processRows', {
enumerable: false,
value: function(key, rowDel) {
value: function (key, rowDel) {
if (_isEnhanced(key)) {
return this.map(_toArray).filter(_defined);
} else {
return this.filter(_defined).join(rowDel);
return this.filter(_defined).join(rowDel);
}
}
});

Object.defineProperty(Array.prototype, "processCols", {
Object.defineProperty(Array.prototype, 'processCols', {
enumerable: false,
value: function(key, rowDel) {
value: function (key, colDel) {
if (_isEnhanced(key)) {
return this.filter(_defined);
} else {
return this.filter(_defined).join(colDel);
return this.filter(_defined).join(colDel);
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions dist/js/tableexport.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/tableexport.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Type definitions for TableExport v5.0.1
// Type definitions for TableExport v5.0.2
// Project: https://tableexport.travismclarke.com
// Definitions by: Travis Clarke <https://github.com/clarketm>

/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 1 files
+3 −3 README.md
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport",
"version": "5.0.1",
"version": "5.0.2",
"authors": [
"clarketm <travis.m.clarke@gmail.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down
27 changes: 17 additions & 10 deletions src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v5.0.1 (https://www.travismclarke.com)
* TableExport.js v5.0.2 (https://www.travismclarke.com)
*
* Copyright (c) 2018 - Travis Clarke - https://www.travismclarke.com
*
Expand Down Expand Up @@ -148,7 +148,7 @@
* Version.
* @memberof TableExport.prototype
*/
version: '5.0.1',
version: '5.0.2',
/**
* Default library options.
* @memberof TableExport.prototype
Expand Down Expand Up @@ -962,20 +962,27 @@
return TableExport.prototype.CONSTANTS.TYPE;
})();

Array.prototype.processRows = function (key, rowDel) {
Object.defineProperty(Array.prototype, 'processRows', {
enumerable: false,
value: function (key, rowDel) {
if (_isEnhanced(key)) {
return this.map(_toArray).filter(_defined);
return this.map(_toArray).filter(_defined);
} else {
return this.filter(_defined).join(rowDel);
return this.filter(_defined).join(rowDel);
}
};
Array.prototype.processCols = function (key, colDel) {
}
});

Object.defineProperty(Array.prototype, 'processCols', {
enumerable: false,
value: function (key, colDel) {
if (_isEnhanced(key)) {
return this.filter(_defined);
return this.filter(_defined);
} else {
return this.filter(_defined).join(colDel);
return this.filter(_defined).join(colDel);
}
};
}
});

var _uuid = (function () {
var uuid = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/stable/js/tableexport.min.js

Large diffs are not rendered by default.

0 comments on commit a18b724

Please sign in to comment.