UNPKG

flipr

Version:

Feature flipping and configuration using yaml files, etcd, or other flipr sources

12 lines (9 loc) 216 B
const crypto = require('crypto'); function idToPercent(id) { return crypto .createHash('md5') .update(String(id), 'utf-8') .digest() .readUInt32LE(4) / 4294967295; } module.exports = idToPercent;