npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nv-get-random-values

v1.0.0

Published

nv-get-random-values ======================= - same as crypto.getRandomValues - simple wrap of crypto.getRandomValues to avoid : DOMException [QuotaExceededError]: The requested length exceeds 65,536 bytes - support FloatTypedArray and ArrayBuffer and Da

Readme

nv-get-random-values

  • same as crypto.getRandomValues
  • simple wrap of crypto.getRandomValues to avoid : DOMException [QuotaExceededError]: The requested length exceeds 65,536 bytes
  • support FloatTypedArray and ArrayBuffer and DataView

install

  • npm install nv-get-random-values

usage

  const getRandomValues  = require("nv-get-random-values");

example

    > var ab = new ArrayBuffer(65537)
    > getRandomValues(ab)
    > ab
    ArrayBuffer {
      [Uint8Contents]: <f9 da c3 5e 2a 05 03 b0 b2 27 ce 3c a0 93 2e 66 86 31 74 b5 6c 45 ed dd 1d 31 b5 52 b7 bb 14 23 92 f8 2c 6c 7c af be c4 b4 80 f7 a8 dd c3 c3 18 b3 00 08 35 2f 6f 0a f1 70 68 2a d3 f9 fc 4e 4c 7b 15 b0 3b 53 7a ab 1b fc 30 fe ab 8b cd f8 47 f4 fe 21 39 f9 3b 39 18 a2 a4 c8 f7 a0 9d 72 f6 f3 98 d9 49 ... 65437 more bytes>,
      byteLength: 65537
    }


    var u16a = new Uint16Array(1024*1024*512);
    getRandomValues(u16a)

    > u16a
    Uint16Array(536870912) [
      61465, 42267, 36595, 14446,  6859,  9717, 49183, 32276,
      11667, 11445, 19657, 60604, 57622, 11835, 13572,   138,
      35485, 30370, 37128, 26873, 33691,  7911, 48943, 31131,
      46891, 34467, 16840,  7208, 20594, 34910, 29729,  7445,
      64418, 10277, 28287, 23711, 18314, 61726, 31650, 20591,
      11456, 33753, 16547, 53200, 29901, 60636, 14555,  4248,
      24189, 54129, 37858, 41713, 59744, 47078, 37252, 30257,
      47331, 46343, 46778, 24047, 23013,  5833, 51527, 56080,
      39317,  8416, 58250, 47312, 50677, 18357, 23677, 30563,
      54025, 16830, 51983, 39262, 59341, 20818, 60378, 58544,
      22011, 33740, 16012, 52726, 33518,   522, 51816, 52889,
      51463, 46709, 12075, 24782, 17099, 55025,  2106, 13492,
        215, 26433, 11366,  3834,
      ... 536870812 more items
    ]
    > 

    var f32a = new Float32Array(16385);
    getRandomValues(f32a)
    > f32a
    > f32a
    Float32Array(16385) [
      7.778468624417001e-13,
      1.749459184655673e+33,
      -8.160149669980749e+25,
      1.2789833453260256e-31,
      -3.963198301890859e+37,
      -8382006497827095000,
      0.0003309941093903035,
      6.035875541549418e+24,
      2070070656,
      ....
    ]


    var f64a = new Float32Array(8193);
    getRandomValues(f64a)  
    > f64a
    Float32Array(8193) [
        0.0000616460747551173,    4.799488158227657e-38, -1.3102224054885224e-25,
        8.250607159626363e-35,   1.0809262403877618e+23,             924065.0625,
                247106.421875,   -5.623769154047254e+22,   1.1244358688600187e-7,
        ...
      -1.0665523368993957e-12,  -1.0732819814706263e+29, -2.9870795530361535e-37,
    ...
    ]


    var u64a = new BigUint64Array(8193);
    getRandomValues(u64a)  
    > u64a  
    BigUint64Array(8193) [
       2302722242467597411n,  1984628925042550598n, 10979331346543240423n,
      18138836546890784880n,  8499427350350933246n, 10417557258900234131n,
       5753987758466790000n, 11027852167042747236n,  3279377313528098163n,
      13886580408729987773n,   537068078521930593n, 13319668477505083335n,
      ...
       4476794433959645139n,  7603231641362984490n,  5494308809252184211n,
      11437283966248178489n,  9382486356394534052n, 11664890693933100211n,
      10160184950554824565n,  4093137840964670528n, 17813984759058651806n,
      16755341494649912864n,
      ... 8093 more items
    ]
    >   

    var i64a = new BigInt64Array(8193);
    getRandomValues(i64a)  
    > i64a
    BigInt64Array(8193) [
      -3283113613754311255n,  8283704947201239835n,   141200950951960242n,
      -3448862961415466720n,  5021087136500461538n, -6651306749080991142n,
       1950813384352664202n,  6852270041077330573n,  5342624158790842885n,
       4590992216306508734n, -4846930881919214199n,  1555312156454248659n,
       6196312503731476000n, -5903614227005657034n,  2023345465048062785n,

METHODS

APIS

LICENSE

  • ISC