How to use the lorem-ipsum function in lorem-ipsum

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 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 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();
    }
  }
github Bandwidth / shared-components / stories / Alert.js View on Github external
addAlert = () => {
    const alert = {
      message: ipsum({ count: Math.floor(Math.random() * 4) }),
      type: this.randomType(),
      id: Math.random(),
    };
    this.setState(({ alerts }) => ({
      alerts: [alert, ...alerts],
    }));
  };
github webiny / webiny-js / packages / webiny-app-cms / src / editor / plugins / elements / text / index.js View on Github external
create({ content = {}, ...options }: Object) {
            const previewText = content.text || loremIpsum(content.lipsum || defaultLipsum);

            return {
                type: "cms-element-text",
                elements: [],
                data: {
                    text: createValue(previewText, content.typography || "paragraph"),
                    settings: {
                        margin: {
                            mobile: { top: 0, left: 0, right: 0, bottom: 15 },
                            desktop: { top: 0, left: 0, right: 0, bottom: 25 },
                            advanced: true
                        },
                        padding: {
                            desktop: { all: 0 },
                            mobile: { all: 0 }
                        }
github Detaysoft / react-chat-elements / example / App.js View on Github external
},
                    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={[
                                {
                                    icon: {
github Clever / components / components / ModalView.jsx View on Github external
)}
          `}
        >
          <button type="primary"> this.setState({isModalOpen: true})}
            value="Open Modal"
          /&gt;
          {this.state.isModalOpen &amp;&amp; (
             this.setState({isModalOpen: false})}
            &gt;
              <p>{loremIpsum({count: 1, units: "paragraphs"})}</p>
              <p>{loremIpsum({count: 1, units: "paragraphs"})}</p>
              <footer>
                </footer></button><button type="link" value="Never mind"> this.setState({isModalOpen: false})}
                /&gt;
                </button><button type="primary" value="Sounds good"> this.setState({isModalOpen: false})}
                /&gt;
              
            
          )}
        </button>
github jauhararifin / ugrade / web / src / services / clarification / InMemoryClarificationService / InMemoryClarificationService.ts View on Github external
setInterval(() => {
      for (const contestId of Object.keys(this.clarificationsMap)) {
        const clarifArr = this.clarificationsMap[contestId]
        for (const clarif of clarifArr) {
          const newEntry: ClarificationEntry = {
            id: Math.round(Math.random() * 100000).toString(),
            sender: 'jury',
            content: loremIpsum({ count: 1, units: 'paragraphs' }),
            read: false,
            issuedTime: new Date(),
          }
          clarif.entries.push(newEntry)
        }
      }
    }, 60 * 1000)
  }

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 2 years ago

Package Health Score

61 / 100
Full package analysis