kbranigan / js_validator_in_ruby

Embedded v8 in C which links to ruby, so you can validate JS code while in Ruby

Home Page:js_validator_for_ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This embeds V8 in a module, so you can validate javascript files in Ruby.

Basic Example:

require 'V8/V8'

puts V8.compile('some_javascript.js')


This will return either false (for no errors) or an array of errors.
Demo usage is in test.rb

You may have to compile V8 yourself and replace the libv8.a file.

About

Embedded v8 in C which links to ruby, so you can validate JS code while in Ruby

js_validator_for_ruby


Languages

Language:C 98.0%Language:C++ 1.5%Language:Ruby 0.3%Language:JavaScript 0.2%