UNPKG

seo-html-defect-checker

Version:

Lightweight module for checking SEO HTML defect elements.

17 lines (13 loc) 443 B
const MissTag = require('./miss-tag') class CustomRule extends MissTag { constructor(tag, attributes, preselector = null, customFn = null) { super(tag, attributes, preselector) this.customFn = customFn } check(domQuery) { return typeof this.customFn === 'function' ? this.customFn.call(this, domQuery, this.toSelector()) : null } } module.exports = CustomRule