Functions
Function Evaluation
invoke
import { invoke } from 'funkcia/functions';
declare const shape: Shape;
const humanReadableShape = invoke(() => {
switch (shape.kind) {
case 'CIRCLE':
return 'Circle';
case 'SQUARE':
return 'Square';
default:
const invalidKind: never = shape.kind;
throw new Error(`Invalid shape: ${invalidKind}`);
}
});lazyCompute
Functional Primitives
identity
noop
Constant Functions
always
alwaysNull
alwaysUndefined
alwaysVoid
ignore
alwaysTrue
alwaysFalse
Type Utilities
coerce
compose
pipe
Last updated
Was this helpful?