diff options
author | matthewsotoudeh <matthewsot@outlook.com> | 2015-05-10 18:41:15 -0700 |
---|---|---|
committer | matthewsotoudeh <matthewsot@outlook.com> | 2015-05-10 18:41:15 -0700 |
commit | 14f554a8e40cfc8e07dcb5d25511e9dfda8e4b45 (patch) | |
tree | 650692871c83d0b6a50efd32fc8c326a22d2551e | |
parent | 5b04698aebf68c471db2146340b2a03f5b4549a3 (diff) |
more in the README
-rw-r--r-- | README.md | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -31,4 +31,15 @@ jfn.defineFunction(Math, "root", ["number", "number"], [2], function (base, powe alert(Math.root(8, 3)); //2 (cubed root of 8) alert(Math.root(9)); //3 (square root of 9) -```
\ No newline at end of file +``` + +jfn.defineFunction arguments: +``` +jfn.defineFunction(object, propertyName, argumentTypes, defaults, function); +``` + +``object`` is the object you'd like to define the function on +``propertyName`` is the name of the function that you'd like to define on ``object`` +``argumentTypes`` is an array of argument types to match this function with. Pass "*" to have a catchall function. +``defaults`` is an array of default values. Note that the last value in ``defaults`` acts as the default value for the last argument specified in ``argumentTypes`` +``function`` is the function to run |