source: trip-planner-front/node_modules/to-fast-properties/readme.md@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 752 bytes
RevLine 
[6a3a178]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, John-David Dalton, Sindre Sorhus
Note: See TracBrowser for help on using the repository browser.