Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
textual analysis on your functions and arguments, fun!
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
README.md
index.js
package.json

README.md

Textual

Ever have a callback and wanted to know what arguments are in there? Ever want to see if the last argument in a user-supplied callback invokes a certain method?

Textual doesn't judge you.

var textual = require('textual');
var fn = function (x, y,z) {
    var foo = x + y;
    z.done();
};
textual.doesObjectCallMethod(fn, textual.getLastArg(fn), 'done');

> TRUE

Methods

.getArgs(fn)

Returns a list of arguments for function fn

.getLastArg(fn)

Returns the last argument for function fn

.getFirstArg(fn)

Returns the first argument for function fn

.doesObjectCallMethod(fn, objectstring, methodstring)

Returns true/false if object calls a method in function fn.

Proper Usage

Serve your use cases with ease!

Something went wrong with that request. Please try again.