🐊Putout plugin adds ability to add missing operator 'new'
npm install @putout/plugin-add-missing-new[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-add-missing-new.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-add-missing-new "npm"
> The Set constructor lets you create Set objects that store unique values of any type, whether primitive values or object references.
>
> (c) MDN
🐊Putout plugin adds ability to add missing operator new, since built-in objects:
- Set;
- WeakSet;
- Map;
- WeakMap;
- Int8Array;
- Uint8Array;
- Uint8ClampedArray;
- Int16Array;
- Uint16Array;
- Int32Array;
- Uint32Array;
- Float32Array;
- Float64Array;
- BigInt64Array;
- BigUint64Array;
Produces TypeError when called without new like this:
```
Uncaught TypeError: Constructor Set requires 'new'
Part of @putout/plugin-new.
``
npm i @putout/plugin-add-missing-new
`json`
{
"rules": {
"add-missing-new": "on"
}
}
`js`
const map = Map();
`js``
const map = new Map();
MIT