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

Method toArray

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

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

(includeLabel = true)

Source from the content-addressed store, hash-verified

2470 * @override
2471 */
2472 toArray(includeLabel = true) {
2473 const arr = [
2474 this.questionId_, // field 1 - question_id
2475 this.questionText_, // field 2 - question_text
2476 this.questionCategory_, // field 3 - question_category
2477 this.surveyAnswers_ ? this.surveyAnswers_.map(item => item.toArray(includeLabel)) : [], // field 4 - survey_answers
2478 ];
2479 if (includeLabel) {
2480 arr.unshift(this.label());
2481 }
2482 return arr;
2483 }
2484
2485 /**
2486 * @return {string}

Callers

nothing calls this directly

Calls 2

labelMethod · 0.95
toArrayMethod · 0.45

Tested by

no test coverage detected