References
Array
| summary | ||
| public |
Checks if predicate returns truthy for any element of collection. |
|
| public |
Casts values as an array if it's not one. |
|
| public |
F changeOrder(source: Array<T>, order: Array<number>): Array<T> Returns array with changed order. |
|
| public |
F cloneArray(source: Array<T>): Array<T> Will create clone of given array. |
|
| public |
Creates an array with all falsey values removed. |
|
| public |
Checks if predicate returns truthy for all elements of collection. |
|
| public |
Will fill array by given value. |
|
| public |
Will fill array in the begining for n elements and add given array in the end. |
|
| public |
Will fill array in the end for n elements and add given array from begining. |
|
| public |
Will filter an array. |
|
| public |
Iterates over elements of collection, returning the first element predicate returns truthy for. |
|
| public |
Will return first element from array. |
|
| public |
Flattens array. |
|
| public |
Will group objects in array by given property, function or path. |
|
| public |
Will group objects in array by function. |
|
| public |
F groupByPath(source: Array<object>, groupPath: *): object Will group objects in array by object path. |
|
| public |
F groupByProp(source: Array<object>, groupVal: string): object Will group objects in array by property. |
|
| public |
Will return first element from array. |
|
| public |
Will return last element from array. |
|
| public |
Will project array object. |
|
| public |
Will return element from array by given index. |
|
| public |
number or string comparator. |
|
| public |
Will return array of selected properties. |
|
| public |
The opposite of filter; this method returns the elements of collection that predicate does not return truthy for. |
|
| public |
Will return random element from array. |
|
| public |
Will shuffle elements in array. |
|
| public |
Checks if predicate returns truthy for any element of collection. |
|
| public |
Sorts array of objects by given properties with priorities. |
|
| public |
Will return last element from array. |
|
| public |
Will return first n elements. |
|
| public |
Will return last n elements from an array. |
|
| public |
F takeRightWhile(source: Array<T>, rightWhileFn: Function): Array<T> Creates a slice of array with elements taken from the end. |
|
| public |
Creates a slice of array with elements taken from the beginning. |
|
| public |
Invokes the iteratee n times, returning an array of the results of each invocation. |
|
| public |
returns new array only with uniq elements |
|
| public |
Returns an array without match item. |
|
| public |
Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. |
|
| public |
F zipWithProjection(): Array<D> Will zip multiple Arrays using projection function. |
|
Constants
Context
| summary | ||
| public |
Will invoke list of functions with given context. |
|
| public |
F invokeWithCtx(ctx: object, fns: ...Function): void Will invoke list of functions with given context in single invokation. |
|
| public |
Is opposite to invoke function. |
|
| public |
Will take function, arguments and return function that will invoke given function with given arguments. |
|
Data-Structures
| summary | ||
| public |
Creates safe type tuple. |
|
| public |
C Tuple Tuple implementation. |
|
Error
| summary | ||
| public |
|
|
| public |
F throwIncorrectArgsTypeErrorIfSomeOf(conditions: ...boolean) Throws IncorrectArgsTypeError if at least one of conditions is positive. |
|
Fantasy-Land
| summary | ||
| public |
F Either() Either implementation. |
|
| public |
Left Implementation. |
|
| public |
Right Implementation. |
|
| public |
F Applicative(f: any): Appicative Appicative implementation. |
|
| public |
Apply implementation. |
|
| public |
Functor implementation. |
|
| public |
F LazyFunctor(x: any): LazyFunctor LazyFunctor implementation. |
|
| public |
Monad implementation. |
|
| public |
Just Implementation. |
|
| public |
F Maybe() Maybe implementation. |
|
| public |
Creates new Nothing. |
|
| public |
Checks if passed object implements setoid. |
|
| public |
Creates Setoid from given function. |
|
Function
| summary | ||
| public |
Creates a function that invokes fn once it's called n or more times. |
|
| public |
This method is like pipe except that it creates a function that invokes the provided functions from right to left. |
|
| public |
Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. |
|
| public |
Creates a function that memoizes the result of fn. |
|
| public |
Creates a function that is restricted to invoking func once. |
|
| public |
Creates curry variation of function if some of arguments are missed. |
|
| public |
Creates a function that invokes fn with partials prepended to the arguments it receives. |
|
| public |
Creates a function that returns the result of invoking the provided f unctions with the this binding of the created function, where each successive invocation is supplied the return value of the previous. |
|
| public |
Reorginizes argument order. |
|
| public |
Create funtion that makes same as passed function but newly created function will use only first argument. |
|
Function-Combinators
| summary | ||
| public |
This combinator takes two functions and returns the result of the first one if the value is defined (not false, null, or undefined); otherwise, it returns the result of the second function. |
|
| public |
Creates function which will always return passed argument. |
|
| public |
F duplication(fn: Function): Function Takes function and invokes it with passed argument two times. |
|
| public |
Takes function and changes argument order. |
|
| public |
The fork combinator is useful in cases where you need to process a single resource in two different ways and then combine the results. |
|
| public |
F identity(value: T): T The identity combinator is a function that returns the same value it was provided as an argument. |
|
| public |
The seq combinator is used to loop over a sequence of functions. |
|
| public |
Helps to check data in chain. |
|
| public |
Takes argument and returns function which expects to get function which will be invoked with first argument. |
|
Lens
| summary | ||
| public |
Makes a deep clone of an object, setting or overriding the specified property with the given value. |
|
| public |
Updates Array or Object by given path with given value. |
|
| public |
Returns value taken by index from source. |
|
| public |
Returns a lens whose focus is the specified property. |
|
| public |
Retrieve the value at a given path. |
|
| public |
Retrieve the value at a given path and compares it with given value. |
|
| public |
Retrieve the value at a given path and if value is undefined returns orValue. |
|
| public |
Retrieve the value at a given path and returns result of invocation satisfy function with value by path. |
|
| public |
Returns value taken by property from source. |
|
Math
| summary | ||
| public |
Adds numbers. |
|
| public |
F compareDecimalNumbers(number1: number, number2: number): boolean Compares two small decimal values. |
|
| public |
Divide numbers. |
|
| public |
F getRandomInt(max: number): number Will generate random integer. |
|
| public |
F getRandomIntFromTo(min: number, max: number): number Will generate random integer in passed range. |
|
| public |
Multiply numbers. |
|
| public |
Subtract numbers. |
|
Object
| summary | ||
| public |
F cloneObject(objectToClone: object): object Will create object clone. |
|
| public |
F conformsTo(object: object, predicateSetModel: object): boolean Checks object properties with set of predicates. |
|
| public |
Will create an object deep clone. |
|
| public |
F deepEquals(first: any, second: any): boolean Compares two elements. |
|
| public |
F deepFreeze(obj: object): object Will deep frezee all properties. |
|
| public |
F getWithCtx(obj: object): Function Curry version of get function that expects in future to get property list. |
|
| public |
F getWithProps(props: ...string): Function Curry version of get function that expects in future to get context. |
|
| public |
Iterates by object properties. |
|
| public |
Will create and return a new object with omited properties from omitArray. |
|
| public |
Will create and return a new object with selected properties from pickArray. |
|
| public |
Implementation of optional chain operator. |
|
| public |
Implementation of optional chain operator. |
|
Predicate
| summary | ||
| public |
Checks if two elements are the same |
|
| public |
Saves number1 and returns predicate function that will be checking if number2 is greater then number1. |
|
| public |
Saves number1 and returns predicate function that will be checking if number2 is greater then or equal to number1. |
|
| public |
Saves number1 and returns predicate function that will be checking if number2 is less then number1. |
|
| public |
Saves number1 and returns predicate function that will be checking if number2 is less then or equal to number1. |
|
| public |
Checks if two elements are not the same. |
|
| public |
Saves number1, number2 and returns predicate function that will be checking if future passed number is in range of number1 and number2. |
|
| public |
F rangeEqual(number1: number, number2: number): Function Saves number1, number2 and returns predicate function that will be checking if future passed number is in range of number1 and number2 or equal to number1/number2. |
|
Predicate-Combinator
| summary | ||
| public |
Takes list of predicates and returns a one predicate, current predicate will return true only in case if all passed predicates return true. |
|
| public |
Takes list of predicates and returns a one predicate, current predicate will return true only in case if all passed predicates return false. |
|
| public |
Takes list of predicates and returns a one predicate, current predicate will return true only in the case if none of passed prdicates returns true. |
|
| public |
Takes list of predicates and returns a one predicate, current predicate will return true if at least one of passed predicates returns true. |
|
String
| summary | ||
| public |
F buildResource(src: String, args: Array<T>): String Works similarly to templates. |
|
| public |
Converts string to camel case. |
|
| public |
F equalsIgnoreCase(str1: String, str2: String): boolean Will compare two strings with ignore case. |
|
| public |
F getFirstLowerLetter(source: String): String Will return first lower letter from source. |
|
| public |
F getFirstUpperLetter(source: String): String Will return first upper letter from source. |
|
| public |
F getLastLowerLetter(source: String): String Will return last lower letter from source. |
|
| public |
F getLastUpperLetter(source: String): String Will return last upper letter from source. |
|
| public |
Work similary to indexOf method but returns boolean. |
|
| public |
Converts string to kebab case. |
|
| public |
F replaceAll(replaceable: String, from: String, to: T): String Will replace all occurrences. |
|
| public |
F replaceAllDifferences(replaceable: String, fromList: Array<T>, to: Array<T>): String Will replace all different occurrences. |
|
| public |
Converts string to snake case. |
|
| public |
Removes leading and trailing whitespace or specified characters from string. |
|
| public |
F upperFirst(str: String): String Will make a capital first letter. |
|
| public |
Splits string into an array of its words. |
|
Type
| summary | ||
| public |
Checks type of passed value. |
|
| public |
F getTypeByClass(clazz: T): string Returns class name. |
|
| public |
Checks if passed value is Array. |
|
| public |
Checks if passed value is boolean. |
|
| public |
Checks if passed value is Date. |
|
| public |
F isFunction(valToCheck: T): boolean Checks if passed value is Function. |
|
| public |
Checks if passed value is NaN. |
|
| public |
F isNegativeZero(numberToCheck: number): boolean Checks if passed value is negative zero. |
|
| public |
F isNotArray(valToCheck: T): boolean Checks if passed value is not Array. |
|
| public |
F isNotBoolean(valToCheck: T): boolean Checks if passed value is not boolean. |
|
| public |
Checks if passed value is not Date. |
|
| public |
F isNotFunction(valToCheck: T): boolean Checks if passed value is not Function. |
|
| public |
Checks if passed value is not NaN. |
|
| public |
F isNotNegativeZero(numberToCheck: number): boolean Checks if passed value is not negative zero. |
|
| public |
Checks if passed value is not null. |
|
| public |
F isNotNumber(valToCheck: T): boolean Checks if passed value is not number. |
|
| public |
F isNotObject(valToCheck: T): boolean Checks if passed value is not Object. |
|
| public |
F isNotPrimitive(value: T): boolean Determine whether a value is not a primitive type. |
|
| public |
F isNotRegExp(valToCheck: T): boolean Checks if passed value is not RegExp. |
|
| public |
F isNotString(valToCheck: T): boolean Checks if passed value is not string. |
|
| public |
F isNotSymbol(valToCheck: T): boolean Checks if passed value is not Symbol. |
|
| public |
F isNotUndefined(valToCheck: T): boolean Checks if passed value is not undefined. |
|
| public |
Checks if passed value is null. |
|
| public |
Checks if passed value is number. |
|
| public |
Checks if passed value is Object. |
|
| public |
F isPrimitive(value: T): boolean Determine whether a value is a primitive type. |
|
| public |
Checks if passed value is RegExp. |
|
| public |
Checks if passed value is string. |
|
| public |
Checks if passed value is Symbol. |
|
| public |
F isUndefined(valToCheck: T): boolean Checks if passed value is undefined. |
|
| public |
Takes expectation and returns predicate function which will be checking if new passed variable not equal to expectation. |
|
| public |
Takes expectation and returns predicate function which will be checking if new passed variable equal to expectation. |
|
| public |
Checks if type is correct and throws error in negative case. |
|