Expand description
Data validation and soul reference detection
This module validates data values according to Gun’s rules and detects soul references.
Based on Gun.js valid.js - matches the exact validation logic.
§Valid Data Types
null- Valid (represents deletion)string- Always validboolean- Always validnumber- Valid if notInfinityorNaN- Soul reference - Object with only
{"#": "soul_id"}key - Objects - Not directly valid (must be stored as nodes)
- Arrays - Not directly supported
Functions§
- is_
valid_ data - Check if data is valid for storage in Gun
- valid
- Validate a value according to Gun’s rules and detect soul references
- valid_
soul - Check if a value is a valid soul reference