How to use the @politie/sherlock.safeUnwrap function in @politie/sherlock

To help you get started, we’ve selected a few @politie/sherlock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github politie / sherlock / extensions / sherlock-utils / src / control-flow.ts View on Github external
function shouldBeLive(opts?: PreparedOptions): boolean {
    return !opts || !opts.skipFirst &&
        (opts.from === undefined || safeUnwrap(opts.from) === true) &&
        (opts.until === undefined || safeUnwrap(opts.until) === false) &&
        (opts.when === undefined || safeUnwrap(opts.when) === true);
}
github politie / sherlock / extensions / sherlock-utils / src / control-flow.ts View on Github external
function shouldBeLive(opts?: PreparedOptions): boolean {
    return !opts || !opts.skipFirst &&
        (opts.from === undefined || safeUnwrap(opts.from) === true) &&
        (opts.until === undefined || safeUnwrap(opts.until) === false) &&
        (opts.when === undefined || safeUnwrap(opts.when) === true);
}
github politie / sherlock / extensions / sherlock-utils / src / control-flow.ts View on Github external
function shouldBeLive(opts?: PreparedOptions): boolean {
    return !opts || !opts.skipFirst &&
        (opts.from === undefined || safeUnwrap(opts.from) === true) &&
        (opts.until === undefined || safeUnwrap(opts.until) === false) &&
        (opts.when === undefined || safeUnwrap(opts.when) === true);
}