Skip to content

brynary/jsflay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Analyze JavaScript code to eradicate duplication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages