All files / src is-null.ts

83.33% Statements 5/6
100% Branches 3/3
100% Functions 1/1
80% Lines 4/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 1022x       22x 69x     69x  
import Sanitised from './sanitised.js'
 
/** @returns `true` if value is `null` or sanitised null, `false` otherwise. */
export const isNull =
  (value: unknown) =>
    value === null ||
    (value instanceof Sanitised && value.toString() === 'null')
 
export default isNull