Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cirolee/tiny-lorem
A library of modern JavaScript tool for generating mock data
https://github.com/cirolee/tiny-lorem
Last synced: about 1 month ago
JSON representation
A library of modern JavaScript tool for generating mock data
- Host: GitHub
- URL: https://github.com/cirolee/tiny-lorem
- Owner: CiroLee
- License: mit
- Created: 2022-08-13T05:19:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-29T06:56:40.000Z (about 2 months ago)
- Last Synced: 2024-11-29T07:33:26.758Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://ciro.club/tiny-lorem
- Size: 651 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-ZH.md
- License: LICENSE
Awesome Lists containing this project
README
tiny-lorem
> 用于生成模拟数据的现代 JavaScript 工具库。拥有完善的类型提示。可用于浏览器环境和 node 环境。
[English](README.md) | 简体中文
[![codecov](https://codecov.io/gh/cirolee/tiny-lorem/branch/main/graph/badge.svg)](https://codecov.io/gh/cirolee/tiny-lorem/branch/main) ![npm bundle size](https://img.shields.io/bundlephobia/min/tiny-lorem) ![npm](https://img.shields.io/npm/v/tiny-lorem) ![NPM](https://img.shields.io/npm/l/tiny-lorem)
## 安装
pnpm
```shell
pnpm add tiny-lorem
```yarn
```shell
yarn install tiny-lorem
```npm
```shell
npm install tiny-lorem
```## 使用
ESM(ESModule)
```ts
import TinyLorem from 'tiny-lorem';
const lorem = new TinyLorem();lorem.texts.word(); // 汉
lorem.number.int(); // 123
```CJS(CommonJs)
```ts
const TinyLorem = require('tiny-lorem');
const lorem = new TinyLorem();lorem.texts.word(); // 汉
lorem.number.int(); // 123
```## API 文档
[文档](https://ciro.club/tiny-lorem)
## Inspired by
[Mockjs](https://github.com/nuysoft/Mock)
[faker-js](https://github.com/faker-js/faker)## LICENSE
[MIT](LICENSE)