MCPcopy Create free account
hub / github.com/cameri/nostream / setCreatedAtLimits

Function setCreatedAtLimits

test/integration/features/nip-22/nip-22.feature.ts:16–23  ·  view source on GitHub ↗
(maxPositiveDelta: number, maxNegativeDelta: number)

Source from the content-addressed store, hash-verified

14const draftOffsetSeconds = Symbol('nip22DraftOffsetSeconds')
15
16const setCreatedAtLimits = (maxPositiveDelta: number, maxNegativeDelta: number) => {
17 const settings = SettingsStatic._settings ?? SettingsStatic.createSettings()
18
19 SettingsStatic._settings = pipe(
20 assocPath(['limits', 'event', 'createdAt', 'maxPositiveDelta'], maxPositiveDelta),
21 assocPath(['limits', 'event', 'createdAt', 'maxNegativeDelta'], maxNegativeDelta),
22 )(settings) as any
23}
24
25Before({ tags: '@nip-22' }, function(this: any) {
26 this[previousSettingsSnapshot] = SettingsStatic._settings

Callers 1

nip-22.feature.tsFile · 0.85

Calls 1

createSettingsMethod · 0.80

Tested by

no test coverage detected