MCPcopy Create free account
hub / github.com/postlight/parser / cleanBySelectors

Function cleanBySelectors

src/extractors/root-extractor.js:6–12  ·  view source on GitHub ↗
($content, $, { clean })

Source from the content-addressed store, hash-verified

4
5// Remove elements by an array of selectors
6export function cleanBySelectors($content, $, { clean }) {
7 if (!clean) return $content;
8
9 $(clean.join(','), $content).remove();
10
11 return $content;
12}
13
14// Transform matching elements
15export function transformElements($content, $, { transforms }) {

Callers 2

transformAndCleanFunction · 0.85

Calls 1

$Function · 0.85

Tested by

no test coverage detected