Skip to content
/ lorem-cn Public
forked from webzhao/lorem-cn

Lorem ipsum generator for Chinese language in Javascript.

Notifications You must be signed in to change notification settings

ostoc/lorem-cn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

A ramdom Chinese characters generator

Lorem ipsum generator for Chinese language in Javascript.

中文版乱数假文生成器,Javascript实现。

Usage 使用方法

Include lorem-cn.js in your HTML file which is UTF-8 encoded. 在HTML中引入 lorem-cn.js 文件。为避免乱码问题,请使用UTF-8编码。

<meta charset="UTF-8">
<script src="path/to/lorem-cn.js"></script>

Use lorem function with the length of text you wish to genrate as parameter. 使用lorem方法生成随即文本,第一个参数为文本长度。

lorem(100); //return 100 random chinese characters
lorem(75); //return 75 random chinese characters

If you don't want punctuations in the generated text, set usePunc to false. 如果你不想让生成的文本包含标点符号,在选项中设置 usePuncfalse

lorem(20, {usePunc: false}); //20 characters without punctuations

If you want break the paragraph, set true. 如果你想要使用分段功能请设置为 true

lorem(2000, {usePunc: true}, true); //2000 characters with punctuations and break

About

Lorem ipsum generator for Chinese language in Javascript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.7%
  • CSS 19.4%
  • HTML 15.9%