MCPcopy Index your code
hub / github.com/OneNoteDev/WebClipper / valueHasExpired

Method valueHasExpired

src/scripts/http/cachedHttp.ts:81–84  ·  view source on GitHub ↗

* Returns true if the timestamped data is older than the expiry time; false otherwise.

(value: TimeStampedData, expiryTime: number)

Source from the content-addressed store, hash-verified

79 * Returns true if the timestamped data is older than the expiry time; false otherwise.
80 */
81 public static valueHasExpired(value: TimeStampedData, expiryTime: number): boolean {
82 let lastUpdated = value && value.lastUpdated ? value.lastUpdated : 0;
83 return (Date.now() - lastUpdated >= expiryTime);
84 }
85
86 /*
87 * Helper function that stores a value together with a timestamp as a json string. If

Callers 3

getFreshValueMethod · 0.80
userInfoUpdateCbMethod · 0.80
testsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected