evaluate

Type:
<string>

It evaluates the JavaScript code provided inside the browser context over the target URL, returning the result.
It's quite similar to selector, but designed to specify the value to be obtained in a JavaScript-like way.
const mql = require('@microlink/mql')

const jQuery = (url) =>
  mql(url, {
    data: {
      version: {
        evaluate: 'jQuery.fn.jquery',
        type: 'string',
      },
    },
  })

const { data } = await jQuery('https://zoom.us')

console.log(`jQuery version is: ${data.version}`)
You can combine evaluate with types for data correcteness.

evaluate

Type:
<string>

It evaluates the JavaScript code provided inside the browser context over the target URL, returning the result.
It's quite similar to selector, but designed to specify the value to be obtained in a JavaScript-like way.
const mql = require('@microlink/mql')

const jQuery = (url) =>
  mql(url, {
    data: {
      version: {
        evaluate: 'jQuery.fn.jquery',
        type: 'string',
      },
    },
  })

const { data } = await jQuery('https://zoom.us')

console.log(`jQuery version is: ${data.version}`)
You can combine evaluate with types for data correcteness.