Nonlinear Performance Magnification

    node-expo-random
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.3 • Public • Published

    node-expo-random

    The package node-expo-random provides the same interface of expo-random. So Thus, you can implement mocks that work as expected even in the Node environment.

    const random = require('node-expo-random');
    
    const bytes = random.getRandomBytes(8);
    console.log(bytes); // Uint8Array(8) [5, 169, 234, 152, 41, 248, 121, 197]

    This package also contains default mocks for Jest testing framework. For details on how to configure, see below.

    Install

    $ npm install --save-dev node-expo-random
    

    Jest configuration

    In your Jest configuration.

    {
      ...
      "json": {
        "setupFilesAfterEnv": [
          "node-expo-random/jest-setup.js"
        ]
      }
    }

    Keywords

    Install

    npm i node-expo-random

    DownloadsWeekly Downloads

    41

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    7

    Last publish

    Collaborators

    • takanori_is