---
id: "packages/active-grid/api/from-active-helpers"
title: "From active-helpers"
description: "serializeDecimals: generated from the source of active-grid."
url: "/packages/active-grid/api/from-active-helpers"
locale: "en"
revision: "g0mvk5qxml-7b52bf0b:from-active-helpers"
---

# From active-helpers

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## Functions, hooks and constants

**serializeDecimals**: `<T>(obj: T) => T`

Recursively convert decimal.js instances (Prisma `Decimal`) to plain
numbers, so a query result can cross the server-to-client boundary, which
does not serialize class instances. The conversion is `toNumber()` and
therefore lossy beyond double precision; a caller that needs exact digits
must convert to a string itself.

Arrays and plain objects are rebuilt recursively (a `__proto__` key stays an
own property); `Date` and `RegExp` instances are returned unchanged.
