# core/predicates/rule.predicate.ts

> 5 lines of code and 2 definitions.

Tree: GovLab Stats
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/stats#file-stats-core-predicates-rule-predicate-ts
Source text: https://banes-lab.com/source/stats/core/predicates/rule.predicate.ts.txt

Listed in [core/predicates](https://banes-lab.com/api/source/stats/core/predicates.md), after [core/predicates/record.predicate.ts](https://banes-lab.com/source/stats/core/predicates/record.predicate.ts.md) and before [core/predicates/source.predicate.ts](https://banes-lab.com/source/stats/core/predicates/source.predicate.ts.md).

## Definitions

- `isOff` (lexical_declaration, line 3, exported)
- `severity` (lexical_declaration, line 4, exported)

## Contained in

- [core/predicates](https://banes-lab.com/anatomy/stats/folder-stats-core-predicates.md)

## Source

```typescript
import { OFF_SEVERITY } from "#configuration/constants/rule.constants";

export const isOff = function isOff(value: unknown): boolean {
    const severity: unknown = Array.isArray(value) ? value.at(0) : value;
    return value === null || value === false || severity === OFF_SEVERITY || severity === 0;
};
```
