@kbss-cvut/s-forms
Version:
Semantic forms generator and processor
24 lines (23 loc) • 1.08 kB
TypeScript
export default class Utils {
/**
* Calculates a simple hash of the specified string, much like usual Java implementations.
* @param str The string to compute has for
* @return {number}
*/
static getStringHash(str: any): number;
/**
* Wraps passed object into new array if it is not array already.
* @param object_or_array An object or array.
* @returns {*} New array containing passed object or passed array.
*/
static asArray(object_or_array: any): any;
static findQuestionById(id: any, question: any, reflexive: any, asserted: any, transitive: any): any;
/**
* Finds the first key in an array of objects that matches any of the specified keys.
*
* @param {Object[]} objectList - The array of objects to search through.
* @param {string[]} keysToCheck - An array of keys to check in each object.
* @returns {?string} - The first key that exists in any of the objects, or null if none are found.
*/
static findKeyInObjects(objectList: Object[], keysToCheck: string[]): string | null;
}