MCPcopy Index your code
hub / github.com/ampproject/amphtml / getExpr

Method getExpr

src/service/variable-source.js:265–271  ·  view source on GitHub ↗

* Returns a Regular expression that can be used to detect all the variables * in a template. * @param {!{[key: string]: *}=} opt_bindings * @param {!{[key: string]: boolean}=} opt_allowlist Optional allowlist of names * that can be substituted. * @return {!RegExp}

(opt_bindings, opt_allowlist)

Source from the content-addressed store, hash-verified

263 * @return {!RegExp}
264 */
265 getExpr(opt_bindings, opt_allowlist) {
266 if (!this.initialized_) {
267 this.initialize_();
268 }
269 const all = {...this.replacements_, ...opt_bindings};
270 return this.buildExpr_(Object.keys(all), opt_allowlist);
271 }
272
273 /**
274 * @param {!Array<string>} keys

Callers 3

expandMethod · 0.80
getMacroNamesMethod · 0.80

Calls 2

initialize_Method · 0.95
buildExpr_Method · 0.95

Tested by

no test coverage detected