1.0.4 • Published 6 years ago

flex-seo v1.0.4

Weekly downloads
2
License
Apache 2.0
Repository
github
Last release
6 years ago

Install

npm install flex-seo

Run tests

npm test

Quick start

var fs = require('fs');

var Flexseo = require('flex-seo');
var Input = require('flex-seo').Input;
var Output = require('flex-seo').Output;
var Rule = require("flex-seo").Rule;

// chain any predefined rules
var opt = {
    enableImgTagDefect: true,
    enableATagDefect: true,
    enableHeadTagDefect: true,
    enableStrongTagDefect: true,
    enableH1TagDefect: true
};

var flexseo = new Flexseo(opt);

// configure input and output
flexseo.setInput(new Input().createInputFile(__dirname+"/test.html"));
flexseo.setOutput(new Output().createOutputConsole());

// implement additional rule for meta tag
flexseo.addRule(Rule.detectExistTagWithAttribute("head", "meta", "http-equiv"));

// show all of the SEO defects
flexseo.detectSEO().then(
  function(result){
    console.log(result);
  },
  function(err){
    console.log("catch error: ");
    console.log(err);
  }
);
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago