How to use the faker.random.arrayElement function in faker

To help you get started, we’ve selected a few faker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eggheadio / egghead-ui / src / App / utils / resourcesByType / index.js View on Github external
{({data}) => (
                    
                      }
                      lessonsUrl={rootData.lessons_url}
                      includeLessonsInCourses
                    />
                  )}
github aredotna / ervell / .storybook / mocks.js View on Github external
Deed: () => ({
    key: random.uuid(),
    created_at: `${random.number({ min: 1, max: 10 })} hours ago`,
    action: random.arrayElement([
      'connected',
      'followed',
      'created',
      'commented on',
      'connected',
    ]),
    connector: random.arrayElement(['on', 'to']),
  }),
github eggheadio / egghead-ui / src / App / utils / resourcesByType / index.js View on Github external
const createNodeExample = () => random.arrayElement([

  <div>
    <div>
      
    </div>
    <button>
      {lorem.words()}
    </button>
  </div>,

  <div>
    </div>
github eggheadio / egghead-ui / src / App / utils / resourcesByType / index.js View on Github external
createExamples: () =&gt; [
          <button>
            {lorem.words()}
          </button>,
          <button color="{random.arrayElement(colors)}" size="{random.arrayElement(buttonSizes)}">
            {lorem.words()}
          </button>,
        ],
      },
github eggheadio / egghead-ui / src / App / utils / resourcesByType / index.js View on Github external
createExamples: () =&gt; [
          
            {lorem.paragraph()}
          ,
          
            {lorem.paragraph()}
          
        ],
      },