first
// 用法
randBox.first()
randBox.first({ nationality: 'en' })
生成一个随机名字
randBox.first();
=> 'Leila'
可选择指定性别以限制名字为该性别
randBox.first({ gender: "female" });
=> 'Emma'
可选择指定国籍以限制名字为该国籍最常见的名字
randBox.first({ nationality: "it" });
=> 'Alberto'
注意,目前对国籍的支持仅限于:'en', 'it', 'nl', 'fr'
。
最后更新于: