Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Analyze JavaScript code to eradicate duplication
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
spec
.gitignore
History.txt
MIT-LICENSE.txt
README.rdoc
Rakefile

README.rdoc

jsflay

Description

jsflay analyzes JavaScript code for structural simularities. Differences in literal values, variable names, whitespace, formatting, semicolons, etc are all ignored. Making this totally rad.

jsflay is heavily based on the outstanding work of Ryan Davis and Seattle.rb in creating flay (ruby.sadi.st/, rubyforge.org/projects/seattlerb).

Features

  • Differences in literal values, variable, class, and method names are ignored.

  • Differences in whitespace, programming style, braces, etc are ignored.

  • Works across files.

  • Reports differences at any level of code.

Example

$ jsflay public/javascripts/jquery.highlightFade.js
Processing public/javascripts/jquery.highlightFade.js...

Matches found (mass = 111)
  public/javascripts/jquery.highlightFade.js:77
  public/javascripts/jquery.highlightFade.js:78
  public/javascripts/jquery.highlightFade.js:79

Requirements

  • Johnson (sudo gem install johnson)

Install

Download the source. Run:

rake install_gem

An official gem published to RubyForge will be coming soon.

Authors

License

See MIT-LICENSE.txt in this directory.

Something went wrong with that request. Please try again.