JSPM

  • Created
  • Published
  • Downloads 15156
  • Score
    100M100P100Q129631F
  • License MIT

Validates html using validator.nu

Package Exports

  • html-validator

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html-validator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#html-validator#

A Node.js module for validating html using validator.nu

At the moment only the URL as a GET parameter is implemented from the Validator.nu Web Service Interface

##Installation##

$ npm install html-validator

##Usage##

Create an options object.

url is required and is the url to the page you want to validate.

format This is the formatting of the returned data. It supports json, html, xhtml, xml, gnu and text.

var validator = require('html-validator')
  , opts = {
      url : 'http://url-to-validate.com',
      format : 'json'
  };

validator(opts, function(err, data){
  if(err) throw err;

  console.log(data);
});