selectorAll

Type: string|string[]
Values:
The collection version of selector.
While selector returns you just the first result, selectorAll will returns you all results matching the value provided.
It's equivalent to .
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
</head>
<body>
  <nav>
    <a aria-current="page" class="active" href="/">
    <a href="/#principles">Principles</a>  
    <a href="/#pricing">Pricing</a>
    <a href="/embed">Embed</a>
    <a href="/screenshot">Screenshot</a>
    <a href="/docs/">Docs</a>
    <a href="/blog">Blog</a>
  </nav>
</body>
</html>
const mql = require('@microlink/mql')
const { data } mql(`https://microlink.io`, {
  rules: {
    links: {
      selectorAll: 'nav a',
      attr: 'href',
      type: 'url',
    }
  }
})
{
  "data": {
    "links": [
      "https://microlink.io/",
      "https://microlink.io/#pricing",
      "https://microlink.io/#principles",
      "https://microlink.io/embed/",
      "https://microlink.io/screenshot/",
      "https://microlink.io/docs/",
      "https://microlink.io/blog/"
    ]
  }
}

selectorAll

Type: string|string[]
Values:
The collection version of selector.
While selector returns you just the first result, selectorAll will returns you all results matching the value provided.
It's equivalent to .
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
</head>
<body>
  <nav>
    <a aria-current="page" class="active" href="/">
    <a href="/#principles">Principles</a>  
    <a href="/#pricing">Pricing</a>
    <a href="/embed">Embed</a>
    <a href="/screenshot">Screenshot</a>
    <a href="/docs/">Docs</a>
    <a href="/blog">Blog</a>
  </nav>
</body>
</html>
const mql = require('@microlink/mql')
const { data } mql(`https://microlink.io`, {
  rules: {
    links: {
      selectorAll: 'nav a',
      attr: 'href',
      type: 'url',
    }
  }
})
{
  "data": {
    "links": [
      "https://microlink.io/",
      "https://microlink.io/#pricing",
      "https://microlink.io/#principles",
      "https://microlink.io/embed/",
      "https://microlink.io/screenshot/",
      "https://microlink.io/docs/",
      "https://microlink.io/blog/"
    ]
  }
}