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