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

Method constructor

src/service/storage-impl.js:198–210  ·  view source on GitHub ↗

* @param {!JsonObject} obj * @param {number=} opt_maxValues

(obj, opt_maxValues)

Source from the content-addressed store, hash-verified

196 * @param {number=} opt_maxValues
197 */
198 constructor(obj, opt_maxValues) {
199 /** @const {!JsonObject} */
200 this.obj = /** @type {!JsonObject} */ (recreateNonProtoObject(obj));
201
202 /** @private @const {number} */
203 this.maxValues_ = opt_maxValues || MAX_VALUES_PER_ORIGIN;
204
205 /** @private @const {!{[key: string]: !JsonObject}} */
206 this.values_ = this.obj['vv'] || Object.create(null);
207 if (!this.obj['vv']) {
208 this.obj['vv'] = this.values_;
209 }
210 }
211
212 /**
213 * @param {string} name

Callers

nothing calls this directly

Calls 2

recreateNonProtoObjectFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected