amphtml-validator
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -320,3 +320,4 @@ #!/usr/bin/env node | ||
if (validationResult.status === 'PASS') { | ||
console.log(filename + ': ' + (color ? colors.green('PASS') : 'PASS')); | ||
console.log( | ||
filename + ': ' + (color ? colors.green('PASS') : 'PASS')); | ||
} | ||
@@ -323,0 +324,0 @@ for (var ii = 0; ii < validationResult.errors.length; ii++) { |
{ | ||
"name": "amphtml-validator", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Validator for AMP HTML (www.ampproject.org)", | ||
"engines": { | ||
"node": "^0.10.25" | ||
"node": ">=0.10.25" | ||
}, | ||
@@ -8,0 +8,0 @@ "author": "The AMP HTML Authors", |
@@ -48,8 +48,9 @@ # amphtml-validator Node.js package (Beta!) | ||
'use strict'; | ||
const ampValidator = require('amphtml-validator'); | ||
var amphtmlValidator = require('amphtml-validator'); | ||
ampValidator.getInstance().then((validator) => { | ||
amphtmlValidator.getInstance().then((validator) => { | ||
const result = validator.validateString('<html>Hello, world.</html>'); | ||
((result.status === 'PASS') ? console.log : console.error)(result.status); | ||
for (const error of result.errors) { | ||
for (var ii = 0; ii < result.errors.length; ii++) { | ||
var error = result.errors[ii]; | ||
let msg = 'line ' + error.line + ', col ' + error.col + ': ' + error.message; | ||
@@ -56,0 +57,0 @@ if (error.specUrl !== null) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25515
573
73