Functions
baseCompare
- baseCompare(a: any, b: any): number
-
Parameters
Returns number
binaryIndexOf
- binaryIndexOf(arr: any[], el: any, compare?: baseCompare): number
-
Parameters
-
arr: any[]
-
el: any
-
Default value compare: baseCompare = baseCompare
Returns number
flattenPromises
- flattenPromises<T>(promises: Promise<T[]>[]): Promise<T[]>
-
Type parameters
Parameters
Returns Promise<T[]>
getClassOf
- getClassOf(node: any): Node
permissionCompare
-
Parameters
Returns number
permissionIndexOf
- permissionIndexOf(arr: Permission[], subjectId: string): number
-
Parameters
Returns number
topologicalSort
- topologicalSort(nodes: Hash<any>[], nameKey?: string, parentKey?: string): Hash<any>[]
-
Parameters
-
nodes: Hash<any>[]
-
Default value nameKey: string = "name"
-
Default value parentKey: string = "parent"
Returns Hash<any>[]
Run topological sort on nodes https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm