-
-
Notifications
You must be signed in to change notification settings - Fork 0
env
Eugene Lazutkin edited this page May 9, 2026
·
6 revisions
This module defines the environment and variable-related objects. It is available like that:
import {any} from 'deep6/env.js';The following objects are defined:
- EnvLike — the method contract every environment implementation satisfies (TypeScript-only type).
- Env — the default proto-chain implementation.
-
EnvMap — the Map-stack sibling implementation; lives in
deep6/env-map.js. -
Unifier — an interface for custom unifiers.
-
isUnifier(x) — returns a truthy value for objects based on
Unifier.
-
isUnifier(x) — returns a truthy value for objects based on
-
Variable — a class to create variable objects that can be used with any
EnvLikeenvironment.-
isVariable(x) — returns a truthy value for objects based on
Variable. - variable([name]) — creates a variable object.
-
isVariable(x) — returns a truthy value for objects based on
- any (or _) — special object that matches anything.
Shared primitives (Unifier, Variable, _, any and their helpers) also live in deep6/env-shared.js. Both deep6/env.js and deep6/env-map.js re-export them, so existing import {…} from 'deep6/env.js' keeps working unchanged.