Creates a mock Entity for use in tests.
Entity
Automatically detects whether the value is a domain or IPv4 address and sets the corresponding boolean flags. All other flags default to false.
false
An EntityType string (e.g., 'IPv4', 'domain', 'MD5')
EntityType
'IPv4'
'domain'
'MD5'
The entity value string
A fully populated Entity object
const ip = createEntity('IPv4', '8.8.8.8');const domain = createEntity('domain', 'example.com'); Copy
const ip = createEntity('IPv4', '8.8.8.8');const domain = createEntity('domain', 'example.com');
Creates a mock
Entityfor use in tests.Automatically detects whether the value is a domain or IPv4 address and sets the corresponding boolean flags. All other flags default to
false.