How to use lorem-ipsum - 10 common examples

To help you get started, we’ve selected a few lorem-ipsum 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 gchq / stroom / stroom-ui / src / components / DocExplorer / documentTree.testData.js View on Github external
function createRandomItem(docRefType) {
  return {
    uuid: guid(),
    type: docRefType,
    name: loremIpsum(LOREM_CONFIG),
  };
}
github gchq / stroom / stroom-ui / src / sections / TrackerDashboard / tracker.testData.js View on Github external
import loremIpsum from 'lorem-ipsum';

const getRandomInt = (min, max) => Math.floor(Math.random() * (max - min)) + min;

const LOREM_CONFIG = { count: 3, units: 'words' };

const minimalTracker_undefinedLastPollAge = {
  filterId: 1,
  enabled: true,
  lastPollAge: undefined,
  pipelineName: loremIpsum(LOREM_CONFIG),
  priority: getRandomInt(1, 99),
  filter: '',
  createUser: 'tester',
  createdOn: 87134234234,
};

const minimalTracker_nullLastPollAge = {
  filterId: 2,
  enabled: true,
  lastPollAge: null,
  pipelineName: loremIpsum(LOREM_CONFIG),
  priority: getRandomInt(1, 99),
  filter: '',
  createUser: 'tester',
  createdOn: 87134234234,
};
github imodeljs / imodeljs / test-apps / ui-test-app / src / frontend / appui / contentviews / TableExampleContent.tsx View on Github external
const createLoremPropertyRecord = (column: ColumnDescription) => {
  const lorem = new LoremIpsum();
  const value = lorem.generateWords(5);

  const v: PropertyValue = {
    valueFormat: PropertyValueFormat.Primitive,
    value,
    displayValue: value,
  };
  const pd: PropertyDescription = {
    typename: "text",
    name: column.key,
    displayLabel: column.label,
  };
  column.propertyDescription = pd;
  return new PropertyRecord(v, pd);
};
github keystonejs / keystone-test-project / models / Autocreate.js View on Github external
}

function randomBoolean () {
	return Math.random() > 0.5;
}

function randomString () {
	return randomkey([10, 20]);
}

Autocreate.add({
	text: { type: String, index: true, default: randomString },
	number: { type: Number, index: true, default: randomNumber },
	boolean: { type: Boolean, index: true, default: randomBoolean },
	datetime: { type: Date, index: true, default: Date.now },
	html: { type: String, default: lipsum.bind(null, { count: 2, units: 'paragraphs' }) },
	markdown: { type: String, index: true, default: lipsum },
});

transform.toJSON(Autocreate);
Autocreate.defaultColumns = 'text, number, boolean, datetime';
Autocreate.register();
github Detaysoft / react-chat-elements / example / App.js View on Github external
onLoad: () => {
                        console.log('Photo loaded');
                    },
                    status: status,
                    date: +new Date(),
                    avatar: `data:image/png;base64,${this.photo()}`,
                };
            case 'chat':
                return {
                    id: String(Math.random()),
                    avatar: `data:image/png;base64,${this.photo()}`,
                    avatarFlexible: true,
                    statusColor: 'lightgreen',
                    statusColorType: parseInt(Math.random() * 100 % 2) === 1 ? 'encircle' : undefined,
                    alt: loremIpsum({ count: 2, units: 'words' }),
                    title: loremIpsum({ count: 2, units: 'words' }),
                    date: new Date(),
                    subtitle: loremIpsum({ count: 1, units: 'sentences' }),
                    unread: parseInt(Math.random() * 10 % 3),
                    dropdownMenu: (
                        ,
                                    size: 24,
                                }
                            }}
                            items={[
github ONEARMY / community-platform / src / mocks / maps.mock.tsx View on Github external
export const generatePinDetails = (pin: IMapPin): IMapPinDetail => {
  const randomDate = new Date()
  randomDate.setSeconds(randomDate.getSeconds() - Math.random() * 10000)
  const lastActive = randomDate.toISOString()
  return {
    name: loremIpsum({ count: 2, units: 'words' })
      .split(' ')
      .map(word => word.charAt(0).toUpperCase() + word.slice(1))
      .join(' '),
    shortDescription: loremIpsum({ count: 2, units: 'sentences' }),
    lastActive,
    profilePicUrl: 'https://picsum.photos/50/50',
    profileUrl: '/testing',
    heroImageUrl: `https://picsum.photos/seed/${lastActive}/285/175`,
  }
}
github ONEARMY / community-platform / src / mocks / maps.mock.tsx View on Github external
export const generatePinDetails = (pin: IMapPin): IMapPinDetail => {
  const randomDate = new Date()
  randomDate.setSeconds(randomDate.getSeconds() - Math.random() * 10000)
  const lastActive = randomDate.toISOString()
  return {
    name: loremIpsum({ count: 2, units: 'words' })
      .split(' ')
      .map(word => word.charAt(0).toUpperCase() + word.slice(1))
      .join(' '),
    shortDescription: loremIpsum({ count: 2, units: 'sentences' }),
    lastActive,
    profilePicUrl: 'https://picsum.photos/50/50',
    profileUrl: '/testing',
    heroImageUrl: `https://picsum.photos/seed/${lastActive}/285/175`,
  }
}
github juliankrispel / zettel / examples / src / examples / LongText.tsx View on Github external
import React, { useState, useEffect } from 'react'
import { EditorState } from '@zettel/core'
import Editor from '@zettel/react'
const { LoremIpsum } = require("lorem-ipsum")

const lorem = new LoremIpsum({
  sentencesPerParagraph: {
    max: 4,
    min: 2
  },
  wordsPerSentence: {
    max: 10,
    min: 4
  }
});

const text = `[${lorem.generateParagraphs(3000).split('\n').join('][')}]`

const App = () => {
  const [editorState, setEditorState] = useState(() => EditorState.fromJSON({
    text,
    ranges: [],
github cyclejs / cyclejs / examples / advanced / routing-view / src / main.js View on Github external
function homePageView() {
  return div([
    h1('Welcome to History Examples!'),
    p(placeholderText())
  ])
}
github Clever / components / components / TableView.jsx View on Github external
_reload(numItems) {
    const tableData = [];
    for (var i = 0; i < numItems; i++) {
      tableData.push({
        id: i,
        name: {
          first: loremIpsum({ count: 1, units: "words" }),
          last: loremIpsum({ count: 2, units: "words" }),
        },
        age: Math.round(Math.random() * 100),
        status: loremIpsum({ count: 1, units: "words" }),
        notes: loremIpsum({ count: 2, units: "sentences" }),
      });
    }
    this.setState({ tableData });
    if (this._lazyTable) {
      this._lazyTable.lazyReset();
    }
  }

lorem-ipsum

Generates passages of lorem ipsum text suitable for use as placeholder copy in web pages, graphics, and more. Works in the browser, NodeJS, and React Native.

ISC
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis