# UNSAFE_FUNCTION_CONSTRUCTOR: Function constructor in the component

> Function constructor in the component

> Esta página ainda não tem tradução para o português; este é o texto em inglês. (This page is not translated yet: the English text follows.)

| Severity | Fault                         | Stage        |
| -------- | ----------------------------- | ------------ |
| error    | customer (the source package) | build output |

## What it means

The component builds a function from a string (new Function, Function(...), or the constructor of a function reached through .constructor), which is eval under another name: the string runs as code in the host page (rule new-function).

## How to fix

Write the function in the source instead of building it from text; for formulas, parse them into a small expression tree and evaluate that.
