Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Analyze JavaScript code to eradicate duplication

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 History.txt
Octocat-spinner-32 MIT-LICENSE.txt
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 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.