-
-
Notifications
You must be signed in to change notification settings - Fork 0
unify isOpen()
Eugene Lazutkin edited this page Apr 3, 2026
·
1 revision
Checks if a value is wrapped as "open".
Type guard function to check if a value was wrapped with open().
import {open, isOpen} from 'deep6/unify.js';
const wrapped = open({a: 1});
isOpen(wrapped); // true
isOpen({a: 1}); // false - plain object
isOpen(null); // falseArguments:
-
o— any value to check.
Returns true if o is a Wrap instance with type 'open', false otherwise.
Useful for:
- Type checking before unification
- Debugging pattern structures
- Conditional logic based on open/closed semantics
- open() — wrap an object as "open".
- isSoft() — check if wrapped as "soft".
- isWrapped() — check if wrapped (any type).
Core functions
Environments and variables
Unification
Traverse
Unifiers
Utilities