@es-joy/jsoe 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @typedef {number} Integer
3
+ */
4
+ /**
5
+ * `FileList` polyfill.
6
+ */
7
+ class FileList {
8
+ /**
9
+ * Set private properties and length.
10
+ */
11
+ constructor () {
12
+ // eslint-disable-next-line prefer-rest-params
13
+ this._files = arguments[0];
14
+ this.length = this._files.length;
15
+ }
16
+ /**
17
+ * @param {Integer} index
18
+ * @returns {File}
19
+ */
20
+ item (index) {
21
+ return this._files[index];
22
+ }
23
+ /* eslint-disable class-methods-use-this */
24
+ /**
25
+ * @returns {"FileList"}
26
+ */
27
+ get [Symbol.toStringTag] () {
28
+ /* eslint-enable class-methods-use-this */
29
+ return 'FileList';
30
+ }
31
+ }
32
+ export default FileList;