• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

index.jsD24-Sep-2023294 1211

licenseD24-Sep-20231.1 KiB2318

package.jsonD24-Sep-2023645 3635

readme.mdD24-Sep-2023733 3822

readme.md

1# to-fast-properties [![Build Status](https://travis-ci.org/sindresorhus/to-fast-properties.svg?branch=master)](https://travis-ci.org/sindresorhus/to-fast-properties)
2
3> Force V8 to use fast properties for an object
4
5[Read more.](http://stackoverflow.com/questions/24987896/)
6
7Use `%HasFastProperties(object)` and `--allow-natives-syntax` to check whether an object already has fast properties.
8
9
10## Install
11
12```
13$ npm install --save to-fast-properties
14```
15
16
17## Usage
18
19```js
20const toFastProperties = require('to-fast-properties');
21
22const obj = {
23	foo: true,
24	bar: true
25};
26
27delete obj.foo;
28// `obj` now has slow properties
29
30toFastProperties(obj);
31// `obj` now has fast properties
32```
33
34
35## License
36
37MIT © Petka Antonov, Sindre Sorhus
38