具有多个可选参数的功能的控制台输出

具有多个参数的功能的控制台输出

我有这个类的方法:

searchForProduct({productName, manufacturer, seller}, itemsPerPage = 20, onlyAvailable = true) {
    console.log(Searching for...) // Here's what is my question about
    //do stuff
}

如何打印要传递给该方法的所有参数?

一个想要实现的目标是:

searchForProduct({productName: laptop});

// Output:
"Searching for productName: 'laptop'"

// or

searchForProduct({productName: "laptop", manufacturer: "Dell"});

// Output:
"Searching for productName: 'laptop', manufacturer: 'Dell'"

等等...

Also (if it's possible with any approach that will be proposed) I don't want to print out default itemsPerPage and onlyAvailable even if it will be passed to the method.