From 8aeed406b6539e88f3aa010ff0684dfaf7381b35 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 3 Sep 2023 20:01:44 +1000 Subject: [PATCH] javascript: Add `is [not] nullish` for loose null check These check whether a LHS is nullish, i.e. null or undefined. --- lang/javascript/javascript.talon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/javascript/javascript.talon b/lang/javascript/javascript.talon index a4c6080149..6f41dbd184 100644 --- a/lang/javascript/javascript.talon +++ b/lang/javascript/javascript.talon @@ -27,6 +27,8 @@ settings(): (op | is) strict equal: " === " (op | is) strict not equal: " !== " +is nullish: " == null" +is not nullish: " != null" op null else: " ?? " state const: "const "