How to use the lorem-ipsum.LoremIpsum 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 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 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 petyosi / react-virtuoso / example / material-ui-list.tsx View on Github external
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { Virtuoso } from '../src/Virtuoso'
import { LoremIpsum } from 'lorem-ipsum'
import List from '@material-ui/core/List'
import ListItem from '@material-ui/core/ListItem'
import { ListItemText, ListItemIcon, ListItemAvatar, Avatar } from '@material-ui/core'
import FolderIcon from '@material-ui/icons/Folder'

const lorem = new LoremIpsum({
  sentencesPerParagraph: {
    max: 8,
    min: 4,
  },
  wordsPerSentence: {
    max: 16,
    min: 4,
  },
})

const generated: { [key: number]: string } = {}

const lipsum = (index: number) => {
  if (!generated[index]) {
    generated[index] = lorem.generateSentences(3)
  }
github digidem / react-mapfilter / fixtures / transform.js View on Github external
const fc = require('./example_fc.json')
const fs = require('fs')
const path = require('path')
const LoremIpsum = require('lorem-ipsum').LoremIpsum

const lorem = new LoremIpsum({
  sentencesPerParagraph: {
    max: 3,
    min: 1
  },
  wordsPerSentence: {
    max: 9,
    min: 4
  }
})

const observations = fc.features.map(f => {
  const observation = {
    id: f.id,
    lon: f.geometry && f.geometry.coordinates[0],
    lat: f.geometry && f.geometry.coordinates[1],
    created_at: f.properties.start,
github ganapativs / react-delightful-scroller / stories / components / fakeText.js View on Github external
import { LoremIpsum } from 'lorem-ipsum';

const lorem = new LoremIpsum({
  sentencesPerParagraph: {
    max: 3,
    min: 1,
  },
  wordsPerSentence: {
    max: 16,
    min: 4,
  },
});

export default n => lorem.generateParagraphs(n);

export const generateWords = n => lorem.generateWords(5);

export const generateSentences = n => lorem.generateSentences(5);
github petyosi / react-virtuoso / example / index.tsx View on Github external
import 'react-app-polyfill/ie11'
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { Virtuoso } from '../src/Virtuoso'
import { LoremIpsum } from 'lorem-ipsum'

const lorem = new LoremIpsum({
  sentencesPerParagraph: {
    max: 8,
    min: 4,
  },
  wordsPerSentence: {
    max: 16,
    min: 4,
  },
})

const generated: { [key: number]: string } = {}

const lipsum = (index: number) => {
  if (!generated[index]) {
    generated[index] = lorem.generateSentences(3)
  }

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

64 / 100
Full package analysis