flagsmith-nodejs
Version:
Flagsmith lets you manage features flags and remote config across web, mobile and server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.
10 lines (9 loc) • 525 B
TypeScript
/**
* Given a list of object ids, get a floating point number between 0 and 1 based on
* the hash of those ids. This should give the same value every time for any list of ids.
*
* @param {Array<any>} objectIds list of object ids to calculate the has for
* @param {} iterations=1 num times to include each id in the generated string to hash
* @returns number number between 0 (inclusive) and 100 (exclusive)
*/
export declare function getHashedPercentageForObjIds(objectIds: Array<any>, iterations?: number): number;