Skip to content

(bool)

boolean literals

clojure
(bool val?)

Where:

  1. val: boolean value to match *

Examples

Find feature flags hardcoded to true before extracting them to configuration.

clojure
(var _ true)

Selects in lines { 1, 3 } but not in { 2 }:

typescript
const debugMode = true
const isProduction = false
let enableFeature = true

Locate boolean comparisons that can be simplified.

clojure
(bin === _ (bool true))

Selects in lines { 1 } but not in { 2, 3 }:

typescript
if (isValid === true) { }
if (isReady === false) { }
if (hasPermission) { }

Arguments

val

"true"
"false"

Does NOT support: CompositionFree-form SelectionRefinementReplacement

Copyright © 2022-present Semantic Works, Inc.