Last active
December 22, 2015 14:18
-
-
Save comilab/6484652 to your computer and use it in GitHub Desktop.
Revisions
-
comilab revised this gist
Feb 28, 2014 . 2 changed files with 33 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ var getRandomName = function() { // ゥは使わない気がするので一旦外す var chars = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィェォッャュョー'.split(''), prefixes1 = 'ウクグツフブプヴ'.split(''), prefixes2 = 'ツフブプヴ'.split(''), prefixes3 = 'キシチニヒミリギジヂビピ'.split(''), length = Math.max(Math.floor(Math.random() * 9), 2), name = ''; while (name.length < length) { var rand = Math.floor(Math.random() * chars.length), c = chars[rand]; if (('ンァィゥェォッャュョー'.match(c) && !name.length) || ('ァィゥェォャュョ'.match(c) && (name.length + 2) == length) || ('ッ'.match(c) && (name.length + 1) == length) ) { continue; } if ('ィェォ'.match(c)) { var rand = Math.floor(Math.random() * prefixes1.length); name += prefixes1[rand] + c; } else if ('ァ'.match(c)) { var rand = Math.floor(Math.random() * prefixes2.length); name += prefixes2[rand] + c; } else if ('ャュョ'.match(c)) { var rand = Math.floor(Math.random() * prefixes3.length); name += prefixes3[rand] + c; } else { name += prev = c; } } return name; }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,33 +0,0 @@ -
comilab revised this gist
Sep 30, 2013 . 1 changed file with 31 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,33 @@ var getRandomName = function() { // ゥは使わない気がするので一旦外す var chars = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィェォッャュョー'.split(''), prefixes1 = 'ウクグツフブプヴ'.split(''), prefixes2 = 'ツフブプヴ'.split(''), prefixes3 = 'キシチニヒミリギジヂビピ'.split(''), length = Math.max(Math.floor(Math.random() * 9), 2), name = ''; while (name.length < length) { var rand = Math.floor(Math.random() * chars.length), c = chars[rand]; if (('ンァィゥェォッャュョー'.match(c) && !name.length) || ('ァィゥェォャュョ'.match(c) && (name.length + 2) == length) || ('ッ'.match(c) && (name.length + 1) == length) ) { continue; } if ('ィェォ'.match(c)) { var rand = Math.floor(Math.random() * prefixes1.length); name += prefixes1[rand] + c; } else if ('ァ'.match(c)) { var rand = Math.floor(Math.random() * prefixes2.length); name += prefixes2[rand] + c; } else if ('ャュョ'.match(c)) { var rand = Math.floor(Math.random() * prefixes3.length); name += prefixes3[rand] + c; } else { name += prev = c; } } return name; }; -
comilab created this gist
Sep 8, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ var getRandomName = function() { // ゥは使わない気がするので一旦外す var chars = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィェォッャュョー'.split(''), prefixes1 = ['フ', 'ヴ'], prefixes2 = 'キシチニヒミリギジヂビピ'.split(''), length = Math.max(Math.floor(Math.random() * 9), 2), name = ''; while (name.length < length) { var rand = Math.floor(Math.random() * chars.length), c = chars[rand]; if (('ンァィゥェォッャュョー'.match(c) && !name.length) || ('ァィゥェォャュョ'.match(c) && (name.length + 2) == length) || ('ッ'.match(c) && (name.length + 1) == length) ) { continue; } if ('ァィゥェォ'.match(c)) { var rand = Math.floor(Math.random() * prefixes1.length); name += prefixes1[rand] + c; } else if ('ャュョ'.match(c)) { var rand = Math.floor(Math.random() * prefixes2.length); name += prefixes2[rand] + c; } else { name += prev = c; } } return name; };