What does it mean to enlarge the parentheses directly after the js function call?

I have been watching WeChat Mini Programs recently. About the usage of definitionFilter function, I don"t understand
for example

.
// behavior.js
module.exports = Behavior({
  definitionFilter(defFields) {
    defFields.data.from = "behavior"
  },
})

// component.js
Component({
  data: {
    from: "component"
  },
  behaviors: [require("behavior.js")],
  ready() {
    console.log(this.data.from) //  behavior  component
  }
})

in the code above, what does it mean to add {} after the definitionFilter function is called, and why?
A little depressed


this is not a function call, but a new way for es6 to declare and assign object properties. When the property is a function, you can declare


which is not a function call. Let me split it for you

module.exports = Behavior({
  definitionFilter(defFields) {
    defFields.data.from = 'behavior'
  },
})

obj = {
  definitionFilter(defFields) {
    defFields.data.from = 'behavior'
  },
}
module.exports = Behavior(obj)


{
  definitionFilter(defFields) {
    defFields.data.from = 'behavior'
  },
}

{
  definitionFilter: function definitionFilter(defFields) {
    defFields.data.from = 'behavior'
  },
}


then overwrite because which is an overlay method.

clipboard.png

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4c181-44e9c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4c181-44e9c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?