stack

Home > @infiniteobjects/core-library-web > Functions

Functions class

Utility Functions

Signature:

export declare class Functions 

Methods

Method Modifiers Description
constant(value) static Creates a function that returns value regardless of its input
identity(value) static A function that returns value
isFalsy(value) static Returns true if the value is falsy
isNil(value) static Returns true if the value is null or undefined
isTrue(value) static Returns true if the value is truthy
negate(func) static Creates a function that negates the result of the predicate func. The func predicate is invoked with the this binding and arguments of the created function.
noop(_args) static A no operation function
stubFalse(_args) static Returns false
stubNull(_args) static Returns null
stubTrue(_args) static Returns true