UNPKG

json-q

Version:

Retrieves values from JSON objects (and JavaScript objects) by css-selector-like query (includes attribute filters and array flattening).

14 lines (10 loc) 236 B
var crypto = require('crypto') var max = Math.pow(2, 32) module.exports = random module.exports.cryptographic = true function random () { var buf = crypto .randomBytes(4) .toString('hex') return parseInt(buf, 16) / max }