to-fast-properties
Version:
Force V8 to use fast properties for an object
31 lines (20 loc) • 539 B
Markdown
for an object
[ ](https://stackoverflow.com/questions/24987896/)
Use `%HasFastProperties(object)` and `--allow-natives-syntax` to check whether an object already has fast properties.
```
$ npm install to-fast-properties
```
```js
import toFastProperties from 'to-fast-properties';
const object = {
foo: true,
bar: true
};
delete object.foo;
// `object` now has slow properties
toFastProperties(object);
// `object` now has fast properties
```
> Force V8 to use fast properties