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

Function dateMethod

src/service/url-replacements-impl.js:51–53  ·  view source on GitHub ↗

* Returns a function that executes method on a new Date instance. This is a * byte saving hack. * * @param {string} method * @return {!SyncResolverDef}

(method)

Source from the content-addressed store, hash-verified

49 * @return {!SyncResolverDef}
50 */
51function dateMethod(method) {
52 return () => new Date()[method]();
53}
54
55/**
56 * Returns a function that returns property of screen. This is a byte saving

Callers 1

initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected