> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# No-New-Function

#### Sourcery rule id: `no-new-function`

#### Description

Never use the `Function` constructor.


#### Match

```javascript
var subtract = Function('a', 'b', 'return a - b');
```



#### Explanation

Creating a function using the `Function` constructor evaluates a string similarly to `eval()` which may open
up vulnerabilities.

From the [Airbnb JavaScript Style Guide](https://airbnb.io/javascript/#functions--constructor)
