textual

0.0.1 • Public • Published

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!

/textual/

    Package Sidebar

    Install

    npm i textual

    Weekly Downloads

    1

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • rook2pawn