Skip to main content

Overview

PathResolver provides secure dot-notation path resolution with caching and prototype pollution protection.
Note: PathResolver is used internally by RuleEngine. You typically use engine.resolvePath() instead of accessing PathResolver directly.

resolvePath()

Resolve a dot-notation path to a value.

Parameters

object
required
Object to resolve path in
string
required
Dot-notation path (e.g., ‘user.profile.name’)
any
Value to return if path doesn’t exist

Returns

Resolved value or defaultValue if path doesn’t exist.

Examples


Security Features

Prototype Pollution Protection

PathResolver blocks dangerous paths by default:
Never set allowPrototypeAccess: true in production. It opens security vulnerabilities.

Function Blocking

Functions are blocked by default:

Caching

PathResolver caches resolutions for performance:

Clear Cache


Advanced Usage

Direct PathResolver Access

Literal Values


Configuration

Configure via engine config:

Common Patterns


Error Handling

PathResolver doesn’t throw errors - it returns undefined or defaultValue:

RuleEngine API

Main engine API

Security Guide

Security best practices