Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 351 Bytes

File metadata and controls

27 lines (17 loc) · 351 Bytes

getGivenName

获取随机名。

API

getGivenName(): string
getGivenName(num: number): string[]

参数:

  • [num] (number): 返回数量。

返回:

(string | Array): 返回随机名。

示例

import { getGivenName } from 'cnname';

getGivenName(); // 杰伦
getGivenName(3); // ['运', '卓逸', '枫']