Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
};
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: [],
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)
}
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,
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);
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)
}