4
That’s the new(ish) object destructuring syntax from the latest versions of the ECMAScript standard.
You can read it as asking for the properties Nuxt and Builder from an object returned from the require('nuxt')
statement. Under the hood, you might see something like this in the main file of the nuxt module:
module.exports = { Nuxt, Builder, Somethingelse, MoreObjects, AnotherFunction};
That in itself is a new(ish) shorthand as well, in that it takes a local variable and maps it to a property on an object. Consider:
var number = 5;
var obj = { number : number }; // this is the same as just saying var obj = { number };
Then when you do the const { Nuxt, Builder } = require('nuxt')
, you get two constant variables Nuxt and Builder that you can refer to elsewhere in your code.
Source:stackexchange.com