Class: Fuse

Fuse()

new Fuse()

Creates a new Fuse instance.
Source:

Extends

Methods

else(consequent) → {Fuse}

Accepts a consequent function which automatically becomes resolve. Does not return a Fuse instance as .on after .else would be useless.
Parameters:
Name Type Description
consequent callback Consequent callback function
Source:
Returns:
Returns new FuseItem instance
Type
Fuse

is(value, consequent) → {Fuse}

Accepts a value instead of a test function, and checks for strict equality with this.value.
Parameters:
Name Type Description
value any Any value to check against this.value
consequent function Consequent callback function
Source:
Returns:
An instance of Fuse
Type
Fuse

not(value, consequent) → {Fuse}

Accepts a value instead of a test function, and checks for strict inequality with this.value.
Parameters:
Name Type Description
value any Any value to check against this.value
consequent function Consequent callback function
Source:
Returns:
An instance of Fuse
Type
Fuse

on(predicate, consequent) → {Fuse}

Accepts a test and consequent function each and returns a new Fuse or FuseIterable instance.
Parameters:
Name Type Description
predicate callback A test callback function
consequent callback Consequent callback function
Source:
Returns:
Returns a new Fuse instance
Type
Fuse

resolve() → {null}

Fallback resolve prototype. Returns null when called. Used in case a resolve is never found.
Inherited From:
Source:
Returns:
null
Type
null