> ## 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.

# Dont-Use-Wrappers-For-Builtins

#### Sourcery rule id: `dont-use-wrappers-for-builtins`

#### Description

Don't use `new` syntax with `String`, `Number` and `Boolean` objects


#### Before

```javascript
const items = new Boolean(true);
```

#### After

```javascript
const items = true;
```



#### Explanation

Although possible, there aren’t any good reasons to use these primitive wrappers as constructors.
They tend to confuse other developers more than anything else because they seem like they should act as primitives, but they do not.

If you wish to convert a value to another type, use these without the `new` syntax.

From [ESLint](https://eslint.org/docs/latest/rules/no-new-wrappers)
