@bturkis/loremipsum 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -136
- package/index.d.ts +2 -0
- package/index.js +12 -0
- package/package.json +10 -34
- package/dist/index.cjs +0 -1940
- package/dist/index.d.cts +0 -81
- package/dist/index.d.ts +0 -81
- package/dist/index.js +0 -1903
package/README.md
CHANGED
|
@@ -1,147 +1,23 @@
|
|
|
1
|
-
# @bturkis/loremipsum
|
|
1
|
+
# @bturkis/loremipsum (DEPRECATED)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ⚠️ **This package has been renamed to [@bturkis/lipsumx](https://www.npmjs.com/package/@bturkis/lipsumx)**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
## Migration
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Update your imports:
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- 🔄 **Reproducible Output** - Seed support for consistent results
|
|
14
|
-
- 📝 **Multiple Formats** - Text, HTML, Markdown, JSON
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install @bturkis/loremipsum
|
|
20
|
-
# or
|
|
21
|
-
yarn add @bturkis/loremipsum
|
|
22
|
-
# or
|
|
23
|
-
pnpm add @bturkis/loremipsum
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Quick Start
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { paragraphs, sentences, words } from '@bturkis/loremipsum';
|
|
30
|
-
|
|
31
|
-
// Generate 3 paragraphs
|
|
32
|
-
const text = paragraphs(3);
|
|
33
|
-
|
|
34
|
-
// Generate 5 sentences in Turkish
|
|
35
|
-
const turkishText = sentences(5, { locale: 'tr' });
|
|
36
|
-
|
|
37
|
-
// Generate 10 words in German
|
|
38
|
-
const germanWords = words(10, { locale: 'de' });
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## API
|
|
42
|
-
|
|
43
|
-
### `paragraphs(count?, options?)`
|
|
44
|
-
|
|
45
|
-
Generate paragraphs of Lorem Ipsum text.
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
paragraphs(3, { locale: 'la', startWithLorem: true });
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### `sentences(count?, options?)`
|
|
52
|
-
|
|
53
|
-
Generate sentences.
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
sentences(5, { locale: 'en' });
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### `words(count?, options?)`
|
|
60
|
-
|
|
61
|
-
Generate individual words.
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
words(10, { locale: 'tr' });
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### `generate(options)`
|
|
68
|
-
|
|
69
|
-
Full control over generation with all format outputs.
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
import { generate } from '@bturkis/loremipsum';
|
|
73
|
-
|
|
74
|
-
const result = generate({
|
|
75
|
-
count: 2,
|
|
76
|
-
type: 'paragraph',
|
|
77
|
-
format: 'json',
|
|
78
|
-
locale: 'tr',
|
|
79
|
-
startWithLorem: true,
|
|
80
|
-
seed: 42, // For reproducible output
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
console.log(result.text); // Plain text
|
|
84
|
-
console.log(result.html); // <p>...</p>
|
|
85
|
-
console.log(result.markdown); // Markdown formatted
|
|
86
|
-
console.log(result.json); // { paragraphs: [...] }
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Options
|
|
90
|
-
|
|
91
|
-
| Option | Type | Default | Description |
|
|
92
|
-
|--------|------|---------|-------------|
|
|
93
|
-
| `count` | number | 1 | Number of items to generate |
|
|
94
|
-
| `type` | 'paragraph' \| 'sentence' \| 'word' | 'paragraph' | Type of content |
|
|
95
|
-
| `format` | 'text' \| 'html' \| 'markdown' \| 'json' | 'text' | Output format |
|
|
96
|
-
| `locale` | string | 'la' | Language code |
|
|
97
|
-
| `startWithLorem` | boolean | true | Start with "Lorem ipsum..." |
|
|
98
|
-
| `seed` | number | - | Seed for reproducible output |
|
|
99
|
-
|
|
100
|
-
### `getAvailableLocales()`
|
|
101
|
-
|
|
102
|
-
Get list of all supported languages.
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
import { getAvailableLocales } from '@bturkis/loremipsum';
|
|
106
|
-
|
|
107
|
-
const locales = getAvailableLocales();
|
|
108
|
-
// [{ code: 'la', name: 'Latin', nativeName: 'Latina' }, ...]
|
|
9
|
+
```diff
|
|
10
|
+
- import { lorem } from '@bturkis/loremipsum'
|
|
11
|
+
+ import { lorem } from '@bturkis/lipsumx'
|
|
109
12
|
```
|
|
110
13
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| Code | Language | Native Name |
|
|
114
|
-
|------|----------|-------------|
|
|
115
|
-
| la | Latin | Latina |
|
|
116
|
-
| tr | Turkish | Türkçe |
|
|
117
|
-
| en | English | English |
|
|
118
|
-
| de | German | Deutsch |
|
|
119
|
-
| fr | French | Français |
|
|
120
|
-
| es | Spanish | Español |
|
|
121
|
-
| it | Italian | Italiano |
|
|
122
|
-
| pt | Portuguese | Português |
|
|
123
|
-
| nl | Dutch | Nederlands |
|
|
124
|
-
| pl | Polish | Polski |
|
|
125
|
-
| ru | Russian | Русский |
|
|
126
|
-
| ar | Arabic | العربية |
|
|
127
|
-
| ja | Japanese | 日本語 |
|
|
128
|
-
| zh | Chinese | 中文 |
|
|
129
|
-
| ko | Korean | 한국어 |
|
|
130
|
-
| ... | +15 more | ... |
|
|
131
|
-
|
|
132
|
-
## CLI
|
|
133
|
-
|
|
134
|
-
Looking for command-line tool? Check out [@bturkis/loremipsum-cli](https://www.npmjs.com/package/@bturkis/loremipsum-cli)
|
|
14
|
+
Or install the new package:
|
|
135
15
|
|
|
136
16
|
```bash
|
|
137
|
-
npm
|
|
138
|
-
|
|
17
|
+
npm uninstall @bturkis/loremipsum
|
|
18
|
+
npm install @bturkis/lipsumx
|
|
139
19
|
```
|
|
140
20
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
Try it online at [loremipsum.neisterse.com](https://loremipsum.neisterse.com)
|
|
144
|
-
|
|
145
|
-
## License
|
|
21
|
+
## New Website
|
|
146
22
|
|
|
147
|
-
|
|
23
|
+
Visit the new website: [lipsumx.neisterse.com](https://lipsumx.neisterse.com)
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bturkis/loremipsum is DEPRECATED
|
|
2
|
+
// This package has been renamed to @bturkis/lipsumx
|
|
3
|
+
// Please update your imports:
|
|
4
|
+
// import { lorem } from '@bturkis/lipsumx'
|
|
5
|
+
|
|
6
|
+
console.warn(
|
|
7
|
+
'⚠️ @bturkis/loremipsum is deprecated and will be removed in a future version.\n' +
|
|
8
|
+
'Please update your imports to use @bturkis/lipsumx instead:\n' +
|
|
9
|
+
" import { lorem } from '@bturkis/lipsumx'"
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
module.exports = require('@bturkis/lipsumx');
|
package/package.json
CHANGED
|
@@ -1,47 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bturkis/loremipsum",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "⚠️ DEPRECATED: This package has been renamed to @bturkis/lipsumx",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
5
7
|
"author": "Burak Turkis",
|
|
6
8
|
"license": "MIT",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"import": "./dist/index.js",
|
|
15
|
-
"require": "./dist/index.cjs"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"README.md"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
24
|
-
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
25
|
-
"test": "vitest run",
|
|
26
|
-
"test:watch": "vitest"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"tsup": "^8.3.0",
|
|
30
|
-
"vitest": "^2.1.0"
|
|
9
|
+
"deprecated": "This package has been renamed to @bturkis/lipsumx. Please update your imports.",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@bturkis/lipsumx": "^1.0.27"
|
|
31
12
|
},
|
|
32
13
|
"keywords": [
|
|
33
14
|
"lorem",
|
|
34
15
|
"ipsum",
|
|
35
|
-
"
|
|
36
|
-
"placeholder",
|
|
37
|
-
"text",
|
|
38
|
-
"dummy",
|
|
39
|
-
"developer",
|
|
40
|
-
"multilingual"
|
|
16
|
+
"deprecated"
|
|
41
17
|
],
|
|
42
18
|
"repository": {
|
|
43
19
|
"type": "git",
|
|
44
|
-
"url": "https://github.com/bturkis/
|
|
20
|
+
"url": "https://github.com/bturkis/lipsumx"
|
|
45
21
|
},
|
|
46
|
-
"homepage": "https://
|
|
22
|
+
"homepage": "https://lipsumx.neisterse.com"
|
|
47
23
|
}
|