Skip to content

Instantly share code, notes, and snippets.

@dy
Created November 21, 2019 18:26
Show Gist options
  • Save dy/92ca6fef0b9f4600a6302d92d1b44ae6 to your computer and use it in GitHub Desktop.
Save dy/92ca6fef0b9f4600a6302d92d1b44ae6 to your computer and use it in GitHub Desktop.
NPM package names
-
-
--
-.
-0
-1
-2
-3
-4
-5
-6
-7
-8
-9
-_
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j
-k
-l
-m
-n
-o
-p
-q
-r
-s
-t
-u
-v
-w
-x
-y
-z
07
09
0_
0a
0c
0f
0i
0j
0m
0q
0r
0t
0v
0w
0y
0z
1.
1_
1i
1j
1l
1m
1n
1q
1r
1u
1w
1z
2.
27
2_
2a
2c
2f
2h
2i
2j
2l
2n
2q
2r
2t
2v
2w
2y
2z
3.
30
31
32
35
38
3_
3b
3h
3i
3j
3n
3r
3u
3v
3y
3z
4.
41
46
47
49
4_
4a
4b
4c
4e
4h
4i
4j
4l
4r
4t
4u
4v
4w
4y
4z
5-
5.
50
51
52
53
54
56
57
59
5_
5b
5c
5e
5f
5h
5i
5j
5l
5n
5p
5q
5r
5t
5u
5v
5w
5y
5z
6-
6.
60
61
62
63
65
67
68
6_
6a
6b
6e
6f
6h
6i
6j
6k
6l
6m
6n
6q
6r
6u
6v
6w
6y
6z
7-
7.
71
72
74
75
78
79
7_
7a
7b
7c
7d
7e
7g
7h
7i
7j
7k
7l
7m
7n
7p
7q
7r
7t
7u
7v
7w
7y
8-
8.
80
82
83
84
85
86
89
8_
8b
8c
8d
8e
8f
8g
8h
8i
8j
8k
8m
8n
8p
8q
8r
8s
8u
8v
8w
8y
8z
9.
90
91
92
93
94
95
97
9_
9a
9b
9c
9d
9e
9g
9h
9i
9j
9k
9l
9m
9q
9r
9t
9u
9v
9w
9y
b.
c.
d_
e.
e_
f-
f.
g-
g.
h-
h.
h_
j.
j_
k.
k_
l.
l_
m.
n-
o.
o0
o_
p-
p.
p_
q.
r-
s.
s_
t-
t_
u-
u_
v.
w-
w.
w_
x.
y.
y_
z.
z_
let names = require('all-the-package-names')
let az = [...'.-_'.split(''), '', ...'abcdefghijklmnopqrstuvwxyz0123456789'.split('')]
let freeNames = []
for (let a = 0; a < az.length; a++) {
for (let b = 0; b < az.length; b++) {
// for (let c = 0; c < az.length; c++) {
let name = az[a] + az[b]// + az[c]
if (names.indexOf(name) < 0) freeNames.push(name)
// }
}
}
let npmName = require('npm-name')
// ;(async () => {
// const reallyFreeNames = await npmName.many(freeNames);
// reallyFreeNames.sort()
// for (let name of reallyFreeNames) {
// console.log(name)
// }
// })()
;(async () => {
let names = await Promise.all(freeNames.map(async name => {
try {
let avail = await npmName(name)
if (avail) return name
} catch (e) {
return false
}
}))
names = names.filter(Boolean)
names.sort()
names.forEach(name => console.log(name))
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment