Skip to content

mhborthwick/lorem-intl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lorem-intl

Overview

Generate Lorem Ipsum and placeholder text in multiple languages.

Install

$ npm install lorem-intl

Usage

const { loremIntl } = require("lorem-intl");

loremIntl.text();
//=> 'Lorem ipsum dolor sit ...'

loremIntl.mandarin();
//=> '在一个充满科 ...'

loremIntl.spanish();
//=> 'El rápido zorro marrón ...'
const myLoremIntl = loremIntl.create({
  defaultLanguage: "english",
  defaultSize: "short",
});
myLoremIntl.text();
//=> 'The quick brown fox jumps ...'

API

.text()

Get the default placeholder text.

.create(config?)

Create a new instance of loremIntl with a custom config.

config

Type: Config

Default: { defaultSize: 'medium', defaultLanguage: 'latin' }

.supported-language(size?)

Get a placeholder text by language.

size

Type: Size

Default: 'medium'

Supported Languages

Placeholder text are available for the following languages:

  • arabic

  • english

  • hindi

  • latin

  • mandarin

  • spanish

About

💬 An NPM package that lets you quickly add Lorem Ipsum text in multiple languages for testing and prototyping.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published