---
lang: en
title: 'API docs: repository.isbsontype'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.isbsontype.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [isBsonType](./repository.isbsontype.md)

## isBsonType() function

Checks if the value is BsonType (mongodb) It uses a general way to check the type ,so that it can detect different versions of bson that might be used in the code base. Might need to update in the future.

**Signature:**

```typescript
export declare function isBsonType(value: unknown): value is object;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | unknown |  |

**Returns:**

value is object


