craydent-event
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Craydent 1.0.2

by Clark Inada

Craydent is all inclusive utility library. There are several ways to use the library in NodeJS. More detailed documentation on constants can be found at Craydent Properties. More detailed documentation on methods can be found at Craydent Methods

// require with prototypes - this require will add prototypes to extend classes and add two constants ($c, $g) to the global space.
// $g is an alias to global and $c is the constant containing all the utility methods and properties.
require('craydent-event');
$c.logit($c.VERSION);
arr.prototypedMethod(args);
// require no conflict - this require is the fully modular version with no global constants, prototypes, or methods.
var $c = require('craydent-event/noConflict');
$c.logit($c.VERSION);
$c.prototypedMethod(arr, args);
// require global - this require constants and methods in the global space and add prototypes to extend classes.
// $g is an alias to global and $c is the constant containing all the utility methods and properties.
require('craydent-event/global');
logit($c.VERSION);
arr.prototypedMethod(args);

Categories

Constants

CONSOLE_COLORS (Object) LOCAL_IP (String) TEMPLATE_TAG_CONFIG (Object)
DEBUG_MODE (Boolean) MODULES_LOADED (Object) TEMPLATE_VARS (Array)
ERROR_TYPES (Array) PUBLIC_IP (String) VERSION (String)
HTTP_STATUS_TEMPLATE (Object) RESPONSES (Object)

Methods

Event


off


Info: Method to remove a registered events

Return: (Boolean)

Parameters:

  • event: (String) Event to listen on and invoked on emit
  • func: (Function) Function given when registering

Overloads:

None


on


Info: Method to register events

Return: (Boolean)

Parameters:

  • event: (String) Event to listen on and invoked on emit
  • func: (Function) Function to call on emit

Overloads:

None


once


Info: Method to register events once

Return: (Boolean)

Parameters:

  • event: (String) Event to listen on and invoked on emit
  • func: (Function) Function to call on emit

Overloads:

None


removeAllListeners


Info: Method to remove a registered events

Return: (void)

Parameters:

  • event?: (String) Event name to remove

Overloads:

None

Download

Package Sidebar

Install

npm i craydent-event

Weekly Downloads

67

Version

1.0.2

License

MIT

Unpacked Size

22.3 kB

Total Files

22

Last publish

Collaborators

  • craydent