Node.js 中的奇特名称生成器

发布于 2024-12-08 12:23:43 字数 132 浏览 1 评论 0 原文

Nodejs 中是否有一个奇特的名称生成器来创建像 Heroku 用于创建应用程序那样的名称?
我正在考虑诸如“yellow_birds”、“beautifull_summer”之类的名字。
另外,有没有什么词典可以查一些很酷的单词?

Is there a fancy name generator in nodejs to create names like heroku does for creating applications ?
I'm thinking of names like "yellow_birds", "beautifull_summer" and stuff like that.
Otherwise, are there any dictionnary to pickup cool words ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

娇纵 2024-12-15 12:23:43

不特定于节点,但我在此处找到了以下俳句生成器。您可以通过以下方式对其进行调整:

function haiku(){
  var adjs = ["autumn", "hidden", "bitter", "misty", "silent", "empty", "dry",
  "dark", "summer", "icy", "delicate", "quiet", "white", "cool", "spring",
  "winter", "patient", "twilight", "dawn", "crimson", "wispy", "weathered",
  "blue", "billowing", "broken", "cold", "damp", "falling", "frosty", "green",
  "long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
  "red", "rough", "still", "small", "sparkling", "throbbing", "shy",
  "wandering", "withered", "wild", "black", "young", "holy", "solitary",
  "fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
  "polished", "ancient", "purple", "lively", "nameless"]

  , nouns = ["waterfall", "river", "breeze", "moon", "rain", "wind", "sea",
  "morning", "snow", "lake", "sunset", "pine", "shadow", "leaf", "dawn",
  "glitter", "forest", "hill", "cloud", "meadow", "sun", "glade", "bird",
  "brook", "butterfly", "bush", "dew", "dust", "field", "fire", "flower",
  "firefly", "feather", "grass", "haze", "mountain", "night", "pond",
  "darkness", "snowflake", "silence", "sound", "sky", "shape", "surf",
  "thunder", "violet", "water", "wildflower", "wave", "water", "resonance",
  "sun", "wood", "dream", "cherry", "tree", "fog", "frost", "voice", "paper",
  "frog", "smoke", "star"];

  return adjs[Math.floor(Math.random()*(adjs.length-1))]+"_"+nouns[Math.floor(Math.random()*(nouns.length-1))];
}

Not specific to node, but I've found the following haiku generator here. You could adapt it the following way:

function haiku(){
  var adjs = ["autumn", "hidden", "bitter", "misty", "silent", "empty", "dry",
  "dark", "summer", "icy", "delicate", "quiet", "white", "cool", "spring",
  "winter", "patient", "twilight", "dawn", "crimson", "wispy", "weathered",
  "blue", "billowing", "broken", "cold", "damp", "falling", "frosty", "green",
  "long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
  "red", "rough", "still", "small", "sparkling", "throbbing", "shy",
  "wandering", "withered", "wild", "black", "young", "holy", "solitary",
  "fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
  "polished", "ancient", "purple", "lively", "nameless"]

  , nouns = ["waterfall", "river", "breeze", "moon", "rain", "wind", "sea",
  "morning", "snow", "lake", "sunset", "pine", "shadow", "leaf", "dawn",
  "glitter", "forest", "hill", "cloud", "meadow", "sun", "glade", "bird",
  "brook", "butterfly", "bush", "dew", "dust", "field", "fire", "flower",
  "firefly", "feather", "grass", "haze", "mountain", "night", "pond",
  "darkness", "snowflake", "silence", "sound", "sky", "shape", "surf",
  "thunder", "violet", "water", "wildflower", "wave", "water", "resonance",
  "sun", "wood", "dream", "cherry", "tree", "fog", "frost", "voice", "paper",
  "frog", "smoke", "star"];

  return adjs[Math.floor(Math.random()*(adjs.length-1))]+"_"+nouns[Math.floor(Math.random()*(nouns.length-1))];
}
稀香 2024-12-15 12:23:43

查看这些模块:

Take a look to these modules:

一个人的夜不怕黑 2024-12-15 12:23:43

只需使用名为 random-profile-generator 的 npm 包

var profile = randomProfile.profile();
console.log(profile);

输出

{ 
    id: 'dc3800ea-0ae8-592a-bcd6-2012667c3ccc',
    fullName: 'Della Edwards',
    firstName: 'Della',
    lastName: 'Edwards',
    gender: 'Male',
    birthday: 'Mar 24th, 1959',
    age: 57,
    avatar: 'https://api.adorable.io/avatars/200/Della-Edwards',
    address: '49 Foxrun St., Manchester Township, NJ 08759',
    zip: '08759',
    state: 'NJ',
    phone: '(876) 547-1223',
    email: '[email protected]',
    twitter: '@wunwegda',
    ssn: '744-48-5102'
}

simply use npm package called random-profile-generator

var profile = randomProfile.profile();
console.log(profile);

OUTPUT

{ 
    id: 'dc3800ea-0ae8-592a-bcd6-2012667c3ccc',
    fullName: 'Della Edwards',
    firstName: 'Della',
    lastName: 'Edwards',
    gender: 'Male',
    birthday: 'Mar 24th, 1959',
    age: 57,
    avatar: 'https://api.adorable.io/avatars/200/Della-Edwards',
    address: '49 Foxrun St., Manchester Township, NJ 08759',
    zip: '08759',
    state: 'NJ',
    phone: '(876) 547-1223',
    email: '[email protected]',
    twitter: '@wunwegda',
    ssn: '744-48-5102'
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文