MCPcopy Create free account
hub / github.com/ampproject/amphtml / entries

Method entries

src/form-data-wrapper.js:79–96  ·  view source on GitHub ↗

@override

()

Source from the content-addressed store, hash-verified

77
78 /** @override */
79 entries() {
80 const fieldEntries = [];
81 Object.keys(this.fieldValues_).forEach((name) => {
82 const values = this.fieldValues_[name];
83 values.forEach((value) => fieldEntries.push([name, value]));
84 });
85
86 // Generator functions are not supported by the current Babel configuration,
87 // so we must manually implement the iterator interface.
88 let nextIndex = 0;
89 return /** @type {!Iterator<!Array<string>>} */ ({
90 next() {
91 return nextIndex < fieldEntries.length
92 ? {value: fieldEntries[nextIndex++], done: false}
93 : {value: undefined, done: true};
94 },
95 });
96 }
97
98 /** @override */
99 getFormData() {

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected