lorem-intl
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i lorem-intl

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

43.3 kB

Total Files

24

Last publish

Collaborators

  • mhborthwick