0.1.0 • Published 10 years ago

mice v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

mice 小白鼠

  • 简洁实用的测试数据生成接口

安装

npm install mice

使用

  
  var mice = require('mice')('cn'); // 目前只支持cn、en, 默认cn

  // 生成词语
  mice.word();  // 单个词语
  mice.words(10, '-'); // 10个词语, 并用分隔符‘-’连接


  // 句子
  mice.sentence(); // 单个句子
  mice.sentences(5, '<br>'); // 多个句子,并用分隔符‘<br>’连接
  mice.sentences(5, ['<p>', '</p>']); // 用首尾型tag连接

  // 段落
  mice.paragraph(); //当个段落
  mice.paragraphs(5, '<br>'); // 多个段落,分隔符使用同上


  // 英语接口与汉字一样。

inspiration

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago