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

Method constructor

third_party/subscriptions-project/config.js:269–292  ·  view source on GitHub ↗

* @param {string} productOrPublicationId * @param {boolean} locked

(productOrPublicationId, locked)

Source from the content-addressed store, hash-verified

267 * @param {boolean} locked
268 */
269 constructor(productOrPublicationId, locked) {
270 let publicationId, productId, label;
271 const div = productOrPublicationId.indexOf(':');
272 if (div != -1) {
273 // The argument is a product id.
274 productId = productOrPublicationId;
275 publicationId = productId.substring(0, div);
276 label = productId.substring(div + 1);
277 } else {
278 // The argument is a publication id.
279 publicationId = productOrPublicationId;
280 productId = null;
281 label = null;
282 }
283
284 /** @private @const {string} */
285 this.publicationId_ = publicationId;
286 /** @private @const {?string} */
287 this.productId_ = productId;
288 /** @private @const {?string} */
289 this.label_ = label;
290 /** @private @const {boolean} */
291 this.locked_ = locked;
292 }
293
294 /**
295 * @return {string}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected