@twardoch/namzy 1.0.19 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +19 -16
- package/dist/index.d.ts +7 -8
- package/dist/index.js +15 -21
- package/dist/mangle.d.ts +4 -14
- package/dist/mangle.js +55 -64
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -1
- package/dist/wordlist.d.ts +3 -2
- package/dist/wordlist.js +286 -172
- package/package.json +1 -1
- package/src/cli.ts +20 -18
- package/src/index.ts +17 -25
- package/src/mangle.ts +57 -66
- package/src/web.ts +1 -1
- package/src/wordlist.ts +288 -172
package/dist/wordlist.js
CHANGED
|
@@ -1,174 +1,288 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
1
|
+
// this_file: src/wordlist.ts
|
|
2
|
+
// AUTO-GENERATED by scripts/generate_data.py. Do not edit.
|
|
3
|
+
export const STEMS = [
|
|
4
|
+
"paris", "tokyo", "milan", "rome", "oslo", "lima", "baku", "doha",
|
|
5
|
+
"kiev", "riga", "sofia", "kabul", "dakar", "cairo", "accra", "perth",
|
|
6
|
+
"miami", "boston", "dallas", "denver", "vegas", "tulsa", "fargo", "salem",
|
|
7
|
+
"dover", "leeds", "york", "derby", "bath", "hull", "kent", "devon",
|
|
8
|
+
"essex", "berlin", "munich", "bremen", "bonn", "jena", "mainz", "madrid",
|
|
9
|
+
"lisbon", "porto", "faro", "braga", "athens", "sparta", "rhodes", "crete",
|
|
10
|
+
"naxos", "delos", "rabat", "oran", "tunis", "sana", "mecca", "jeddah",
|
|
11
|
+
"aden", "dubai", "amman", "mosul", "basra", "herat", "dhaka", "delhi",
|
|
12
|
+
"agra", "pune", "surat", "patna", "hanoi", "cebu", "davao", "medan",
|
|
13
|
+
"beijing", "wuhan", "xian", "dalian", "taipei", "seoul", "busan", "daegu",
|
|
14
|
+
"kobe", "sydney", "hobart", "darwin", "cairns", "cuzco", "quito", "cali",
|
|
15
|
+
"natal", "leon", "cancun", "austin", "fresno", "durham", "boise", "reno",
|
|
16
|
+
"juneau", "dublin", "galway", "cork", "bergen", "tromso", "malmo", "turku",
|
|
17
|
+
"kazan", "tomsk", "omsk", "perm", "minsk", "warsaw", "nile", "volga",
|
|
18
|
+
"rhine", "seine", "thames", "tiber", "indus", "congo", "niger", "douro",
|
|
19
|
+
"tagus", "ebro", "loire", "elbe", "oder", "don", "ural", "lena",
|
|
20
|
+
"amur", "chao", "jordan", "snake", "platte", "ohio", "red", "gila",
|
|
21
|
+
"fraser", "peace", "copper", "yampa", "green", "pearl", "james", "hudson",
|
|
22
|
+
"mohawk", "fox", "iowa", "cedar", "grand", "white", "salt", "neches",
|
|
23
|
+
"arno", "taro", "oglio", "adda", "mincio", "piave", "brenta", "ems",
|
|
24
|
+
"weser", "saale", "havel", "spree", "main", "neckar", "lech", "isar",
|
|
25
|
+
"inn", "drava", "sava", "tisza", "prut", "olt", "mures", "somes",
|
|
26
|
+
"drin", "tay", "clyde", "forth", "tweed", "spey", "severn", "trent",
|
|
27
|
+
"avon", "dee", "esk", "wye", "usk", "lee", "suir", "nore",
|
|
28
|
+
"boyne", "bann", "erne", "moy", "lagan", "mekong", "yukon", "ganges",
|
|
29
|
+
"yangtze", "meuse", "rhone", "tarn", "lot", "var", "ain", "aisne",
|
|
30
|
+
"marne", "yonne", "saone", "tilt", "teme", "dove", "ouse", "swale",
|
|
31
|
+
"ure", "tees", "amber", "coral", "jade", "lilac", "mauve", "ochre",
|
|
32
|
+
"ruby", "sepia", "teal", "umber", "plum", "cobalt", "cyan", "navy",
|
|
33
|
+
"salmon", "beige", "linen", "mint", "peach", "rose", "sand", "sky",
|
|
34
|
+
"slate", "snow", "tan", "wine", "bronze", "gold", "brass", "cherry",
|
|
35
|
+
"hazel", "honey", "lemon", "lime", "cream", "cocoa", "mocha", "sage",
|
|
36
|
+
"taupe", "fern", "flax", "ginger", "grape", "khaki", "orchid", "moss",
|
|
37
|
+
"rust", "sienna", "spruce", "jasper", "ash", "fawn", "dust", "gray",
|
|
38
|
+
"char", "ink", "frost", "silver", "claret", "garnet", "jet", "onyx",
|
|
39
|
+
"blush", "rouge", "crimson", "scarlet", "violet", "poppy", "saffron", "citrus",
|
|
40
|
+
"papaya", "melon", "thistle", "topaz", "quartz", "pewter", "saddle", "smoke",
|
|
41
|
+
"fuchsia", "buff", "brick", "coffee", "dune", "dawn", "vine", "ember",
|
|
42
|
+
"seal", "opal", "mango", "chia", "pine", "bay", "sable", "brave",
|
|
43
|
+
"bright", "calm", "clever", "cool", "deep", "eager", "fair", "fine",
|
|
44
|
+
"glad", "happy", "keen", "kind", "merry", "neat", "noble", "proud",
|
|
45
|
+
"quick", "quiet", "swift", "warm", "wise", "witty", "young", "jolly",
|
|
46
|
+
"lucky", "mighty", "smart", "snappy", "spry", "sunny", "super", "tidy",
|
|
47
|
+
"true", "vivid", "wild", "zippy", "able", "alert", "ample", "apt",
|
|
48
|
+
"artful", "balmy", "bold", "breezy", "brisk", "chic", "chill", "cosy",
|
|
49
|
+
"crisp", "dapper", "deft", "dreamy", "easy", "epic", "exact", "fancy",
|
|
50
|
+
"fluent", "fresh", "funky", "gallant", "gentle", "gifted", "glossy", "hardy",
|
|
51
|
+
"hearty", "honest", "humble", "jaunty", "jazzy", "jovial", "joyful", "lavish",
|
|
52
|
+
"light", "limber", "lithe", "loyal", "lucid", "lush", "mellow", "mild",
|
|
53
|
+
"modest", "nifty", "nimble", "peppy", "perky", "placid", "plucky", "plush",
|
|
54
|
+
"posh", "prime", "prompt", "pure", "quaint", "quirky", "rapid", "rare",
|
|
55
|
+
"regal", "robust", "rosy", "royal", "rugged", "sassy", "savvy", "sharp",
|
|
56
|
+
"shiny", "silky", "sleek", "slick", "harbor", "haven", "cove", "glade",
|
|
57
|
+
"meadow", "grove", "summit", "ridge", "peak", "canyon", "vista", "oasis",
|
|
58
|
+
"sanctum", "atrium", "plaza", "forum", "portal", "beacon", "torch", "spark",
|
|
59
|
+
"flame", "prism", "orbit", "comet", "zenith", "apex", "crown", "laurel",
|
|
60
|
+
"medal", "trophy", "gem", "jewel", "charm", "token", "coin", "badge",
|
|
61
|
+
"crest", "emblem", "sigil", "banner", "arrow", "anchor", "compass", "pillar",
|
|
62
|
+
"lantern", "keep", "tower", "castle", "bastion", "manor", "cabin", "lodge",
|
|
63
|
+
"chalet", "villa", "temple", "shrine", "altar", "chapel", "garden", "grotto",
|
|
64
|
+
"spring", "brook", "creek", "tide", "wave", "swell", "shell", "reef",
|
|
65
|
+
"port", "pier", "dock", "wharf", "isle", "atoll", "cape", "cliff",
|
|
66
|
+
"bluff", "mesa", "valley", "vale", "dale", "fen", "heath", "moor",
|
|
67
|
+
"delta", "lagoon", "fjord", "sound", "channel", "gulf", "inlet", "beach",
|
|
68
|
+
"basalt", "crystal", "beryl", "zircon", "spinel", "falcon", "eagle", "soar",
|
|
69
|
+
"glide", "drift", "float", "flow", "leap", "dash", "sprint", "march",
|
|
70
|
+
"wander", "roam", "voyage", "journey", "travel", "embark", "launch", "kindle",
|
|
71
|
+
"rise", "climb", "ascend", "bloom", "blossom", "flower", "grow", "expand",
|
|
72
|
+
"uplift", "foster", "shelter", "guard", "protect", "uphold", "support", "sustain",
|
|
73
|
+
"steady", "align", "tune", "craft", "fashion", "forge", "sculpt", "shape",
|
|
74
|
+
"mold", "weave", "thread", "knit", "stitch", "braid", "build", "raise",
|
|
75
|
+
"unveil", "reveal", "unfold", "open", "share", "spread", "gather", "collect",
|
|
76
|
+
"bond", "join", "meld", "merge", "blend", "fuse", "connect", "link",
|
|
77
|
+
"bridge", "rally", "thrive", "prosper", "attain", "master", "prevail", "excel",
|
|
78
|
+
"shine", "glow", "gleam", "glimmer", "sparkle", "beam", "flash", "flutter",
|
|
79
|
+
"dart", "dive", "surge", "swirl", "spin", "twirl", "pivot", "hover",
|
|
80
|
+
"linger", "swoop", "tumble", "vault", "bound", "bounce", "skip", "prance",
|
|
81
|
+
"gambol", "caper", "romp", "frolic", "cavort", "ada", "alex", "amy",
|
|
82
|
+
"ana", "avi", "ben", "bea", "cam", "dan", "eli", "emma",
|
|
83
|
+
"eva", "finn", "gus", "hugo", "ian", "iris", "ivan", "jane",
|
|
84
|
+
"juno", "kai", "kit", "liam", "lila", "luca", "lyra", "maya",
|
|
85
|
+
"mia", "milo", "nia", "noah", "nora", "oli", "omar", "otto",
|
|
86
|
+
"piper", "quinn", "rex", "rio", "ron", "sam", "sara", "seth",
|
|
87
|
+
"theo", "tom", "uma", "vera", "vic", "will", "xander", "yael",
|
|
88
|
+
"yuki", "zane", "zara", "alma", "anya", "beau", "cole", "cora",
|
|
89
|
+
"dane", "dora", "elsa", "enzo", "erin", "esme", "gabe", "gina",
|
|
90
|
+
"hank", "iggy", "inez", "ivy", "jack", "joel", "kade", "kara",
|
|
91
|
+
"kira", "kyle", "lana", "lars", "leah", "lily", "luna", "mack",
|
|
92
|
+
"maeve", "mads", "matt", "myra", "nash", "neil", "niko", "odin",
|
|
93
|
+
"oren", "orin", "pax", "pete", "raj", "rena", "rhys", "riya",
|
|
94
|
+
"rosa", "ruth", "ryan", "shay", "oak", "elm", "fir", "maple",
|
|
95
|
+
"birch", "beech", "alder", "holly", "rowan", "larch", "yew", "palm",
|
|
96
|
+
"aspen", "poplar", "willow", "walnut", "linden", "cypress", "plane", "fig",
|
|
97
|
+
"pear", "apple", "almond", "cacao", "banyan", "baobab", "teak", "dogwood",
|
|
98
|
+
"box", "quince", "balsa", "sandal", "myrtle", "locust", "pecan", "elder",
|
|
99
|
+
"robin", "finch", "wren", "hawk", "owl", "swan", "crane", "lark",
|
|
100
|
+
"raven", "jay", "kestrel", "heron", "ibis", "kite", "buzzard", "merlin",
|
|
101
|
+
"osprey", "peacock", "parrot", "ostrich", "emu", "kiwi", "puffin", "gull",
|
|
102
|
+
"tern", "petrel", "cuckoo", "magpie", "thrush", "sparrow", "martin", "swallow",
|
|
103
|
+
"plover", "snipe", "quail", "grouse", "turkey", "rooster", "hen", "duck",
|
|
104
|
+
"goose", "mallard", "stork", "bittern", "auk", "loon", "grebe", "coot",
|
|
105
|
+
"rail", "moorhen", "pigeon", "jackdaw", "rook", "crow", "warbler", "tit",
|
|
106
|
+
"pipit", "wagtail", "bunting", "linnet", "siskin", "redpoll", "waxwing", "redwing",
|
|
107
|
+
"shrike", "hoopoe", "roller", "toucan", "macaw", "budgie", "lapis", "mica",
|
|
108
|
+
"gypsum", "flint", "chert", "shale", "marble", "bone", "horn", "antler",
|
|
109
|
+
"storm", "mist", "dusk", "rain", "fog", "haze", "ice", "cloud",
|
|
110
|
+
"breeze", "gust", "gale", "tempest", "squall", "hail", "sleet", "drizzle",
|
|
111
|
+
"thunder", "rainbow", "zephyr", "sunset", "noon", "vapor", "steam", "cinder",
|
|
112
|
+
"spray", "spume", "foam", "shower", "monsoon", "typhoon", "vortex", "eddy",
|
|
113
|
+
"current", "draft", "draught", "warmth", "shimmer", "blaze", "flare", "bolt",
|
|
114
|
+
"cosmos", "pulsar", "quasar", "planet", "star", "moon", "sun", "thor",
|
|
115
|
+
"loki", "freya", "frigg", "hel", "baldr", "tyr", "atlas", "hera",
|
|
116
|
+
"mars", "vesta", "ceres", "leto", "niobe", "isis", "hathor", "horus",
|
|
117
|
+
"apis", "ptah", "thoth", "bast", "set", "seshat", "ammit", "khonsu",
|
|
118
|
+
"sobek", "bes", "maat", "shiva", "vishnu", "rama", "sita", "kali",
|
|
119
|
+
"durga", "indra", "ganesh", "kuber", "surya", "soma", "agni", "vayu",
|
|
120
|
+
"prana", "lakshmi", "mira", "yama", "zeus", "ares", "hades", "hermes",
|
|
121
|
+
"hebe", "helios", "eos", "nyx", "aether", "chaos", "gaia", "cronus",
|
|
122
|
+
"rhea", "tethys", "phoebe", "themis", "pan", "triton", "nereus", "proteus",
|
|
123
|
+
"circe", "scylla", "hydra",
|
|
87
124
|
];
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
125
|
+
export const ROTATIONS = [
|
|
126
|
+
["ba", "bo"],
|
|
127
|
+
["bo", "ba"],
|
|
128
|
+
["bi", "by"],
|
|
129
|
+
["by", "bi"],
|
|
130
|
+
["be", "bi"],
|
|
131
|
+
["bi", "be"],
|
|
132
|
+
["bo", "bu"],
|
|
133
|
+
["bu", "bo"],
|
|
134
|
+
["ca", "co"],
|
|
135
|
+
["co", "ca"],
|
|
136
|
+
["ci", "cy"],
|
|
137
|
+
["cy", "ci"],
|
|
138
|
+
["ce", "ci"],
|
|
139
|
+
["ci", "ce"],
|
|
140
|
+
["co", "cu"],
|
|
141
|
+
["cu", "co"],
|
|
142
|
+
["da", "do"],
|
|
143
|
+
["do", "da"],
|
|
144
|
+
["di", "dy"],
|
|
145
|
+
["dy", "di"],
|
|
146
|
+
["de", "di"],
|
|
147
|
+
["di", "de"],
|
|
148
|
+
["do", "du"],
|
|
149
|
+
["du", "do"],
|
|
150
|
+
["fa", "fo"],
|
|
151
|
+
["fo", "fa"],
|
|
152
|
+
["fi", "fy"],
|
|
153
|
+
["fy", "fi"],
|
|
154
|
+
["fe", "fi"],
|
|
155
|
+
["fi", "fe"],
|
|
156
|
+
["fo", "fu"],
|
|
157
|
+
["fu", "fo"],
|
|
158
|
+
["ga", "go"],
|
|
159
|
+
["go", "ga"],
|
|
160
|
+
["gi", "gy"],
|
|
161
|
+
["gy", "gi"],
|
|
162
|
+
["ge", "gi"],
|
|
163
|
+
["gi", "ge"],
|
|
164
|
+
["go", "gu"],
|
|
165
|
+
["gu", "go"],
|
|
166
|
+
["ha", "ho"],
|
|
167
|
+
["ho", "ha"],
|
|
168
|
+
["hi", "hy"],
|
|
169
|
+
["hy", "hi"],
|
|
170
|
+
["he", "hi"],
|
|
171
|
+
["hi", "he"],
|
|
172
|
+
["ho", "hu"],
|
|
173
|
+
["hu", "ho"],
|
|
174
|
+
["ja", "jo"],
|
|
175
|
+
["jo", "ja"],
|
|
176
|
+
["ji", "jy"],
|
|
177
|
+
["jy", "ji"],
|
|
178
|
+
["je", "ji"],
|
|
179
|
+
["ji", "je"],
|
|
180
|
+
["jo", "ju"],
|
|
181
|
+
["ju", "jo"],
|
|
182
|
+
["ka", "ko"],
|
|
183
|
+
["ko", "ka"],
|
|
184
|
+
["ki", "ky"],
|
|
185
|
+
["ky", "ki"],
|
|
186
|
+
["ke", "ki"],
|
|
187
|
+
["ki", "ke"],
|
|
188
|
+
["ko", "ku"],
|
|
189
|
+
["ku", "ko"],
|
|
190
|
+
["la", "lo"],
|
|
191
|
+
["lo", "la"],
|
|
192
|
+
["li", "ly"],
|
|
193
|
+
["ly", "li"],
|
|
194
|
+
["le", "li"],
|
|
195
|
+
["li", "le"],
|
|
196
|
+
["lo", "lu"],
|
|
197
|
+
["lu", "lo"],
|
|
198
|
+
["ma", "mo"],
|
|
199
|
+
["mo", "ma"],
|
|
200
|
+
["mi", "my"],
|
|
201
|
+
["my", "mi"],
|
|
202
|
+
["me", "mi"],
|
|
203
|
+
["mi", "me"],
|
|
204
|
+
["mo", "mu"],
|
|
205
|
+
["mu", "mo"],
|
|
206
|
+
["na", "no"],
|
|
207
|
+
["no", "na"],
|
|
208
|
+
["ni", "ny"],
|
|
209
|
+
["ny", "ni"],
|
|
210
|
+
["ne", "ni"],
|
|
211
|
+
["ni", "ne"],
|
|
212
|
+
["no", "nu"],
|
|
213
|
+
["nu", "no"],
|
|
214
|
+
["pa", "po"],
|
|
215
|
+
["po", "pa"],
|
|
216
|
+
["pi", "py"],
|
|
217
|
+
["py", "pi"],
|
|
218
|
+
["pe", "pi"],
|
|
219
|
+
["pi", "pe"],
|
|
220
|
+
["po", "pu"],
|
|
221
|
+
["pu", "po"],
|
|
222
|
+
["ra", "ro"],
|
|
223
|
+
["ro", "ra"],
|
|
224
|
+
["ri", "ry"],
|
|
225
|
+
["ry", "ri"],
|
|
226
|
+
["re", "ri"],
|
|
227
|
+
["ri", "re"],
|
|
228
|
+
["ro", "ru"],
|
|
229
|
+
["ru", "ro"],
|
|
230
|
+
["sa", "so"],
|
|
231
|
+
["so", "sa"],
|
|
232
|
+
["si", "sy"],
|
|
233
|
+
["sy", "si"],
|
|
234
|
+
["se", "si"],
|
|
235
|
+
["si", "se"],
|
|
236
|
+
["so", "su"],
|
|
237
|
+
["su", "so"],
|
|
238
|
+
["ta", "to"],
|
|
239
|
+
["to", "ta"],
|
|
240
|
+
["ti", "ty"],
|
|
241
|
+
["ty", "ti"],
|
|
242
|
+
["te", "ti"],
|
|
243
|
+
["ti", "te"],
|
|
244
|
+
["to", "tu"],
|
|
245
|
+
["tu", "to"],
|
|
246
|
+
["va", "vo"],
|
|
247
|
+
["vo", "va"],
|
|
248
|
+
["vi", "vy"],
|
|
249
|
+
["vy", "vi"],
|
|
250
|
+
["ve", "vi"],
|
|
251
|
+
["vi", "ve"],
|
|
252
|
+
["vo", "vu"],
|
|
253
|
+
["vu", "vo"],
|
|
254
|
+
["wa", "wo"],
|
|
255
|
+
["wo", "wa"],
|
|
256
|
+
["wi", "wy"],
|
|
257
|
+
["wy", "wi"],
|
|
258
|
+
["we", "wi"],
|
|
259
|
+
["wi", "we"],
|
|
260
|
+
["wo", "wu"],
|
|
261
|
+
["wu", "wo"],
|
|
262
|
+
["za", "zo"],
|
|
263
|
+
["zo", "za"],
|
|
264
|
+
["zi", "zy"],
|
|
265
|
+
["zy", "zi"],
|
|
266
|
+
["ze", "zi"],
|
|
267
|
+
["zi", "ze"],
|
|
268
|
+
["zo", "zu"],
|
|
269
|
+
["zu", "zo"],
|
|
270
|
+
["k", "q"],
|
|
271
|
+
["q", "k"],
|
|
272
|
+
["c", "k"],
|
|
273
|
+
["k", "c"],
|
|
274
|
+
["ph", "f"],
|
|
275
|
+
["f", "ph"],
|
|
276
|
+
["x", "ks"],
|
|
277
|
+
["ks", "x"],
|
|
278
|
+
];
|
|
279
|
+
export const BAD_SEAMS = [
|
|
280
|
+
"aa",
|
|
281
|
+
"ee",
|
|
282
|
+
"ii",
|
|
283
|
+
"oo",
|
|
284
|
+
"uu",
|
|
285
|
+
"yy",
|
|
286
|
+
"iy",
|
|
287
|
+
"yi",
|
|
174
288
|
];
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -4,24 +4,21 @@
|
|
|
4
4
|
import { generate } from "./index.js";
|
|
5
5
|
|
|
6
6
|
const HELP = `
|
|
7
|
-
namzy — generate
|
|
7
|
+
namzy — generate compact, memorable, unique names
|
|
8
8
|
|
|
9
9
|
Usage:
|
|
10
10
|
namzy [options]
|
|
11
11
|
|
|
12
12
|
Options:
|
|
13
13
|
--count <N> Number of names to generate (default: 1)
|
|
14
|
+
--seed <N> Integer seed (default: current timestamp)
|
|
14
15
|
--help Show this help
|
|
15
|
-
|
|
16
|
-
Examples:
|
|
17
|
-
namzy
|
|
18
|
-
namzy --count 5
|
|
19
16
|
`.trimStart();
|
|
20
17
|
|
|
21
|
-
function parseArgs(argv: string[]): { count: number } {
|
|
18
|
+
function parseArgs(argv: string[]): { count: number; seed?: number } {
|
|
22
19
|
const args = argv.slice(2);
|
|
23
20
|
let count = 1;
|
|
24
|
-
|
|
21
|
+
let seed: number | undefined;
|
|
25
22
|
for (let i = 0; i < args.length; i++) {
|
|
26
23
|
const arg = args[i];
|
|
27
24
|
switch (arg) {
|
|
@@ -33,30 +30,35 @@ function parseArgs(argv: string[]): { count: number } {
|
|
|
33
30
|
case "--count": {
|
|
34
31
|
const n = parseInt(args[++i], 10);
|
|
35
32
|
if (Number.isNaN(n) || n < 1) {
|
|
36
|
-
process.stderr.write(
|
|
33
|
+
process.stderr.write("--count must be a positive integer\n");
|
|
37
34
|
process.exit(1);
|
|
38
35
|
}
|
|
39
36
|
count = n;
|
|
40
37
|
break;
|
|
41
38
|
}
|
|
39
|
+
case "--seed": {
|
|
40
|
+
const n = parseInt(args[++i], 10);
|
|
41
|
+
if (Number.isNaN(n)) {
|
|
42
|
+
process.stderr.write("--seed must be an integer\n");
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
seed = n;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
42
48
|
default:
|
|
43
49
|
process.stderr.write(`Unknown flag: ${arg}\nRun namzy --help for usage.\n`);
|
|
44
50
|
process.exit(1);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
|
-
return { count };
|
|
53
|
+
return { count, seed };
|
|
48
54
|
}
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
const { count } = parseArgs(process.argv);
|
|
52
|
-
const base = Date.now();
|
|
56
|
+
function main(): void {
|
|
57
|
+
const { count, seed } = parseArgs(process.argv);
|
|
58
|
+
const base = seed ?? Date.now();
|
|
53
59
|
for (let i = 0; i < count; i++) {
|
|
54
|
-
|
|
55
|
-
process.stdout.write(`${name}\n`);
|
|
60
|
+
process.stdout.write(`${generate({ seed: base + i * 2654435761 })}\n`);
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
main()
|
|
60
|
-
process.stderr.write(`Error: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
61
|
-
process.exit(1);
|
|
62
|
-
});
|
|
64
|
+
main();
|