1 | void (function(){var _ion_es6_Array_ = function(module,exports,require){'use strict';
|
2 | if (!(Array.prototype.add != null)) {
|
3 | Object.defineProperty(Array.prototype, 'add', { value: Array.prototype.push });
|
4 | }
|
5 | if (!(Array.prototype.remove != null)) {
|
6 | Object.defineProperty(Array.prototype, 'remove', {
|
7 | value: function () {
|
8 | for (var _i = 0; _i < arguments.length; _i++) {
|
9 | var item = arguments[_i];
|
10 | var index = this.lastIndexOf(item);
|
11 | if (index >= 0) {
|
12 | this.splice(index, 1);
|
13 | }
|
14 | }
|
15 | }
|
16 | });
|
17 | }
|
18 | if (!(Array.prototype.contains != null)) {
|
19 | Object.defineProperty(Array.prototype, 'contains', {
|
20 | value: function (item) {
|
21 | return this.indexOf(item) >= 0;
|
22 | }
|
23 | });
|
24 | }
|
25 | }
|
26 | if (typeof require === 'function') {
|
27 | if (require.register)
|
28 | require.register('ion/es6/Array',_ion_es6_Array_);
|
29 | else
|
30 | _ion_es6_Array_.call(this, module, exports, require);
|
31 | }
|
32 | else {
|
33 | _ion_es6_Array_.call(this);
|
34 | }
|
35 | }).call(this)
|
36 |
|
\ | No newline at end of file |