# defectiveseo

> A tool for defective seo tag

Latest version **1.0.13** (published 2018-02-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install defectiveseo
pnpm add defectiveseo
yarn add defectiveseo
bun add defectiveseo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.13 |
| Published | 2018-02-25 |
| First published | 2018-02-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 190.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | NPM Ravi Chandak |
| Maintainers | ravic1995 |
| Keywords | seo |

## Links

- npm: https://www.npmjs.com/package/defectiveseo
- npm.io page: https://npm.io/package/defectiveseo

## Dependencies (4)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [path](https://npm.io/package/path.md) ^0.12.7
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [htmlparser2](https://npm.io/package/htmlparser2.md) ^3.9.2

## Recent versions

- 1.0.13 (latest) — 2018-02-25
- 1.0.12 — 2018-02-25
- 1.0.11 — 2018-02-24
- 1.0.9 — 2018-02-24
- 1.0.8 — 2018-02-24
- 1.0.7 — 2018-02-24
- 1.0.6 — 2018-02-24
- 1.0.5 — 2018-02-24
- 1.0.3 — 2018-02-24
- 1.0.2 — 2018-02-24
- 1.0.1 — 2018-02-24
- 1.0.0 — 2018-02-24

## README

# Defective SEO 

Node module that takes in HTML file and a couple of HTML rules returns defects found in the HTML file.
Can work for one HTML file or for multiple html file in a directory. 

- Takes file from a filepath 
- All defective SEO information is printed out on console.

## Requirement

- NPM v5  or above
- Node v8 or above

## Install

	npm install defectiveseo

## Usage

```Javascript

 const defectiveseo = require('defectiveseo');
 or 
 import defectiveseo from 'defectiveseo'; 

 // defectiveseo( rules : {}, file/directory path );
 defectiveseo({ 
	img: 'alt',
	a: 'rel',
	head: {
		title: true,
		meta: ["description", "robots", "keywords"],	
	},
	strong: 2,
	h1: 100,
	}, 
	"test.html"); 
	// this can be a sinle file or a directory as well

```

## SEO Rules

```

 Types of rules
 1. <tag> : has attribute rule
 2. In head 
 	a. title tag present 
 	b. meta tag has name = [a,b,c,..]
 	c. ..
	..
 3. <tag> :limit check limit rule

 To check if in the HTML document there are any tags without a certain attribute :
 <tag> : '<attribute>'

 To check for tags inside head : 
 head :{ 
	// Check if any HTML file header doesn't have a particular tag
	<tag> : true
	// Check if the <tag> in header doesn't have one of the name attirbute specified
	<tag> : ['optionA', 'optionB', ., ., . ]  // name attribute
 }

 To check if there are more than a certain number of a particular tag add :
 <tag> : limit

```


## Assumptions 

- Valid HTML file and file/subdirectory path 
- For meta tag in head only checking for the attribute 'name'
- Correct rule, one of the three types stated.
- All tags in the rule in lowercase

## Testing

Using ```npm run test``` test the package.

---
_Source: https://npm.io/package/defectiveseo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
