Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Create a set of property completion problems from a given JavaScript program by truncating it at all property reads.

License

Notifications You must be signed in to change notification settings

xiemaisi/truncate-prop-reads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

truncate-prop-reads

Create a set of property completion problems from a given JavaScript program by truncating it at all property reads.

There are two ways of invoking the truncator: on an HTML file, and on a set of JavaScript files.

In the former case, the invocation looks like this:

  node truncate.js foo.html outdir

The truncator will go through all the property read expressions in all the scripts included in foo.html. For each property read x.f in some script script.js, it creates a copy of foo.html that includes all of the original scripts, except for script.js, instead of which it includes a truncated version that contains the property read expression x.$$f. All the generated HTML and JavaScript files are written to directory outdir.

To truncate a set of JavaScript files, invoke the truncator like this:

  node truncate.js f1.js f2.js ... outdir

In this case, the JavaScript files are truncated as above, but instead of generating variant HTML files, the truncator generates subdirectories of outdir, which contain all the JavaScript files, with one of them being truncated at some property read.

About

Create a set of property completion problems from a given JavaScript program by truncating it at all property reads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published