Skip to content

dszlachta/gen.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEN.JS

This simple file generates JavaScript source from JavaScript.

In run time, it turns functions into strings for future usage. It can store values of functions arguments, and generate functions calls with those values.

function add(arg1, arg2) {
  return arg1 + arg2;
}

The function above (for arg1=2 and arg2=4) turns to string:

(function add(arg1, arg2) {
  return arg1 + arg2;
}).call(null, 2, 4)

See examples/

Enviroment

Runs on Node and in browser (with requirejs).

About

Generate JavaScript source from JavaScript in run time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published