polarity-integration-utils
    Preparing search index...

    Function createEntity

    • Creates a mock Entity for 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.

      Parameters

      • type: EntityType

        An EntityType string (e.g., 'IPv4', 'domain', 'MD5')

      • value: string

        The entity value string

      Returns Entity

      A fully populated Entity object

      const ip = createEntity('IPv4', '8.8.8.8');
      const domain = createEntity('domain', 'example.com');