Socket
Book a DemoInstallSign in
Socket

seo-defect-checker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seo-defect-checker

A module to check whether site is SEO friendly or not.

0.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

A module to check whether site is SEO friendly or not.

Basic usage

const checker = require('./checker');
checker.check('./sample/sample.html');

API

checker.check(input, output, rules)

Parameter

  • input: can be either filePath or stream
  • output: can be either file output path or stream, default to console
  • rules: array of rules, it omitted will use predefined 7 rules

User is free to compose rules in any order

const Rules = require('./predefined-rules');

var rules = [
	Rules.MoreThan15StrongTagRule,
	Rules.ImgTagWithoutAltRule,
	Rules.MissingDescriptionInHeadTagRule
];
checker.check('./sample/sample.html', console, rules);

Default Rules.

const Rules = require('./predefined-rules');
Rules.ImgTagWithoutAltRule,
Rules.ATagWithoutRelRule,
Rules.MissingTitleInHeadTagRule,
Rules.MissingDescriptionInHeadTagRule,
Rules.MissingKeywordsInHeadTagRule,
Rules.MoreThan15StrongTagRule,
Rules.MultipleH1TagRule

Custom rules

For e.g. Checking if <meta name=“robots” /> exists

const {
	TagCountRule,
	TagWithoutAttributeRule,
	TagCountExceedThresholdRule
} = require('./rules');

const customRules = new TagCountRule((count) => {
	return "Your msg"
}, 'meta[name="robots"]', (c) => {
	return c > 0
});

For more information take a look at rules.js

FAQs

Package last updated on 25 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.