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

Method toArray

third_party/subscriptions-project/swg.js:859–870  ·  view source on GitHub ↗

* @param {boolean=} includeLabel * @return {!Array<?>} * @override

(includeLabel = true)

Source from the content-addressed store, hash-verified

857 * @override
858 */
859 toArray(includeLabel = true) {
860 const arr = [
861 this.context_ ? this.context_.toArray(includeLabel) : [], // field 1 - context
862 this.event_, // field 2 - event
863 this.meta_ ? this.meta_.toArray(includeLabel) : [], // field 3 - meta
864 this.params_ ? this.params_.toArray(includeLabel) : [], // field 4 - params
865 ];
866 if (includeLabel) {
867 arr.unshift(this.label());
868 }
869 return arr;
870 }
871
872 /**
873 * @return {string}

Callers

nothing calls this directly

Calls 2

labelMethod · 0.95
toArrayMethod · 0.45

Tested by

no test coverage detected