import { parentPort } from 'node:worker_threads'
import { secondsToMilliseconds } from 'date-fns'
-import { mean, median } from 'rambda'
+import { is, mean, median } from 'rambda'
import { BaseError } from '../exception/index.js'
import {
try {
performance.measure(name, markId)
} catch (error) {
- if (error instanceof Error && error.message.includes('performance mark has not been set')) {
+ if (is(Error, error) && error.message.includes('performance mark has not been set')) {
/* Ignore */
} else {
throw error