validate-inline-js

1.0.0 • Public • Published

validate-inline-js Build Status

Validate that inline js in a html file is correct javascript

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install validate-inline-js --save

Usage

var validate = require("validate-inline-js");

// will be an error if the inline js has syntax errors
var error = validate('<html><script>window.alert(beep');

console.log(error);

Tests

npm install
npm test

Dependencies

  • cheerio: Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • syntax-error: detect and report syntax errors in source code strings

Dev Dependencies

  • package-json-to-readme: Generate a README.md from package.json contents
  • semistandard: All the goodness of feross/standard with semicolons sprinkled on top.
  • snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
  • tap: A Test-Anything-Protocol library

License

MIT

Generated by package-json-to-readme

Readme

Keywords

none

Package Sidebar

Install

npm i validate-inline-js

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kesla