<commit_before># babel-plugin-transform-function-bind

> Compile the new function bind operator `::` to ES5.

## Detail

```js
obj::func
// is equivalent to:
func.bind(obj)

obj::func(val)
// is equivalent to:
func.call(obj, val)

::obj.func(val)
// is equivalent to:
func.call(obj, val)
```


## Example

### Basic

```js
const box = {
  weight: 2,
  getWeight() { return this.weight; },
};

const { getWeight } = box;

console.log(box.getWeight()); // prints '2'

const bigBox = { weight: 10 };<commit_msg>Clarify use of bind operator in "prefix position" (#5917)<commit_after># babel-plugin-transform-function-bind

> Compile the new function bind operator `::` to ES5.

## Detail

```js
obj::func
// is equivalent to:
func.bind(obj)

::obj.func
// is equivalent to:
obj.func.bind(obj)

obj::func(val)
// is equivalent to:
func.call(obj, val)

::obj.func(val)
// is equivalent to:
obj.func.call(obj, val)
```


## Example

### Basic

```js
const box = {
  weight: 2,
  getWeight() { return this.weight; },
};

const { getWeight } = box;

console.log(box.getWeight()); // prints '2'

const bigBox = { weight: 10 };
{'fraction_non_alphanumeric': 0.1827956989247312, 'fraction_numerical': 0.012544802867383513, 'mean_word_length': 3.814655172413793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7387951', 'n_tokens_mistral': 426, 'n_tokens_neox': 407, 'n_words': 111}