@adguard/agtree
Version:
Tool set for working with adblock filter lists
27 lines (24 loc) • 708 B
JavaScript
/*
* AGTree v4.1.1 (build date: Thu, 23 Apr 2026 09:15:37 GMT)
* (c) 2026 Adguard Software Ltd.
* Released under the MIT license
* https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
*/
import { HASHMARK } from '../../../utils/constants.js';
import { BaseGenerator } from '../../base-generator.js';
/**
* ID selector generator.
*/
class IdSelectorGenerator extends BaseGenerator {
/**
* Generates a string representation of the ID selector.
*
* @param node ID selector node.
*
* @returns String representation of the ID selector.
*/
static generate(node) {
return HASHMARK + node.value;
}
}
export { IdSelectorGenerator };