src/test.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import PII from "./pii"
import unwrap from "./unwrap"

function test<T>(fn: (item: T) => boolean, item: PII<T>): boolean
function test<T>(fn: (item: T) => boolean, item: T): boolean
function test<T>(fn: (item: T) => boolean, item: PII<T> | T): boolean {
  return fn(unwrap(item))
}

export default test