@marcbachmann/cel-js
Advanced tools
+24
-15
@@ -123,2 +123,11 @@ import {EvaluationError} from './errors.js' | ||
| this.#hasDynTypes = | ||
| this.kind === 'dyn' || this.valueType?.hasDyn() || this.keyType?.hasDyn() || false | ||
| this.#hasPlaceholderTypes = | ||
| this.kind === 'param' || | ||
| this.keyType?.hasPlaceholder() || | ||
| this.valueType?.hasPlaceholder() || | ||
| false | ||
| objFreeze(this) | ||
@@ -128,8 +137,7 @@ } | ||
| hasDyn() { | ||
| return (this.#hasDynTypes ??= | ||
| this.kind === 'dyn' || this.valueType?.hasDyn() || this.keyType?.hasDyn() || false) | ||
| return this.#hasDynTypes | ||
| } | ||
| hasNoDynTypes() { | ||
| return this.hasDyn() === false | ||
| return this.#hasDynTypes === false | ||
| } | ||
@@ -146,7 +154,3 @@ | ||
| hasPlaceholder() { | ||
| return (this.#hasPlaceholderTypes ??= | ||
| this.kind === 'param' || | ||
| this.keyType?.hasPlaceholder() || | ||
| this.valueType?.hasPlaceholder() || | ||
| false) | ||
| return this.#hasPlaceholderTypes | ||
| } | ||
@@ -327,13 +331,16 @@ | ||
| this.handler = this.macro ? wrapMacroExpander(this.signature, handler) : handler | ||
| objFreeze(this) | ||
| } | ||
| hasPlaceholder() { | ||
| return (this.#hasPlaceholderTypes ??= | ||
| this.#hasPlaceholderTypes = | ||
| this.returnType.hasPlaceholder() || | ||
| this.receiverType?.hasPlaceholder() || | ||
| this.argTypes.some((t) => t.hasPlaceholder()) || | ||
| false) | ||
| false | ||
| objFreeze(this) | ||
| } | ||
| hasPlaceholder() { | ||
| return this.#hasPlaceholderTypes | ||
| } | ||
| matchesArgs(argTypes) { | ||
@@ -359,2 +366,5 @@ return argTypes.length === this.argTypes.length && | ||
| this.#hasPlaceholderTypes = | ||
| this.leftType.hasPlaceholder() || this.rightType?.hasPlaceholder() || false | ||
| objFreeze(this) | ||
@@ -364,4 +374,3 @@ } | ||
| hasPlaceholder() { | ||
| return (this.#hasPlaceholderTypes ??= | ||
| this.leftType.hasPlaceholder() || this.rightType?.hasPlaceholder() || false) | ||
| return this.#hasPlaceholderTypes | ||
| } | ||
@@ -368,0 +377,0 @@ |
+6
-6
| { | ||
| "name": "@marcbachmann/cel-js", | ||
| "version": "7.3.0", | ||
| "version": "7.3.1", | ||
| "description": "A lightweight Common Expression Language (CEL) implementation in JavaScript with zero dependencies", | ||
@@ -72,12 +72,12 @@ "keywords": [ | ||
| "service": "drone", | ||
| "commit": "6ce97f5a79e059b8bd616a8bd6faf91f4a7e6eba", | ||
| "build": "230", | ||
| "buildUrl": "https://drone.livingdocs.io/marcbachmann/cel-js/230", | ||
| "commit": "d2520eb4eda8d546e4003c2aab04af524af5d46b", | ||
| "build": "233", | ||
| "buildUrl": "https://drone.livingdocs.io/marcbachmann/cel-js/233", | ||
| "branch": "main", | ||
| "jobUrl": "https://drone.livingdocs.io/marcbachmann/cel-js/230", | ||
| "jobUrl": "https://drone.livingdocs.io/marcbachmann/cel-js/233", | ||
| "isPr": false, | ||
| "slug": "marcbachmann/cel-js", | ||
| "root": "/drone/src", | ||
| "date": "2026-02-06T22:40:22.794Z" | ||
| "date": "2026-02-09T10:56:44.061Z" | ||
| } | ||
| } |
186446
0.06%4751
0.08%