# core/predicates/resource.predicate.ts

> 5 lines of code and 3 definitions.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-core-predicates-resource-predicate-ts
Source text: https://banes-lab.com/assets/sources/source.cda58c68f35ccee5ffc8c417d8fb071b3a798762f8bcf9e297d1e4e3ea5814f8.generated.txt

## Definitions

- `isVector` (lexical_declaration, line 4, exported)
- `CONTENT_TYPE_HEADER` (lexical_declaration, line 1)
- `VECTOR_TYPE` (lexical_declaration, line 2)

## Used by

- [core/loaders/diagram.loader.ts](https://banes-lab.com/source/tree/core/loaders/diagram.loader.ts.md)
- [core/loaders/walk.loader.ts](https://banes-lab.com/source/tree/core/loaders/walk.loader.ts.md)

## Source

```typescript
const CONTENT_TYPE_HEADER = "content-type";
const VECTOR_TYPE = "image/svg+xml";

export const isVector = function isVector(response: Response): boolean {
    return response.ok && (response.headers.get(CONTENT_TYPE_HEADER) ?? "").includes(VECTOR_TYPE);
};
```
