https://github.com/mhborthwick/lorem-intl
💬 An NPM package that lets you quickly add Lorem Ipsum text in multiple languages for testing and prototyping.
https://github.com/mhborthwick/lorem-intl
developer-tool i18n lorem-ipsum placeholder-text testing text-generation typescript
Last synced: 6 months ago
JSON representation
💬 An NPM package that lets you quickly add Lorem Ipsum text in multiple languages for testing and prototyping.
- Host: GitHub
- URL: https://github.com/mhborthwick/lorem-intl
- Owner: mhborthwick
- Created: 2023-09-16T06:45:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T01:39:37.000Z (over 2 years ago)
- Last Synced: 2025-08-09T10:34:43.792Z (11 months ago)
- Topics: developer-tool, i18n, lorem-ipsum, placeholder-text, testing, text-generation, typescript
- Language: TypeScript
- Homepage:
- Size: 126 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# lorem-intl
## Overview
> Generate Lorem Ipsum and placeholder text in multiple languages.
## Install
```sh
$ npm install lorem-intl
```
## Usage
```js
const { loremIntl } = require("lorem-intl");
loremIntl.text();
//=> 'Lorem ipsum dolor sit ...'
loremIntl.mandarin();
//=> '在一个充满科 ...'
loremIntl.spanish();
//=> 'El rápido zorro marrón ...'
```
```js
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`