Skip to content

Commit fa44c51

Browse files
committed
Merge branch 'main' of https://github.com/Axorax/quicksnip
2 parents 626706a + e7a1093 commit fa44c51

File tree

2 files changed

+30
-17
lines changed

2 files changed

+30
-17
lines changed

public/consolidated/all_snippets.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,23 @@
961961
"spaces"
962962
],
963963
"author": "axorax"
964+
},
965+
{
966+
"title": "Random string",
967+
"description": "Generates a random string of characters of a certain length",
968+
"code": [
969+
"function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {",
970+
" return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');",
971+
"}",
972+
"",
973+
"console.log(makeid(5, \"1234\" /* (optional) */));"
974+
],
975+
"tags": [
976+
"javascript",
977+
"function",
978+
"random"
979+
],
980+
"author": "kruimol"
964981
}
965982
]
966983
},
@@ -1645,23 +1662,6 @@
16451662
"promises"
16461663
],
16471664
"author": "0xHouss"
1648-
},
1649-
{
1650-
"title": "Random string",
1651-
"description": "Generates a random string of characters of a certain length",
1652-
"code": [
1653-
"function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {",
1654-
" return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');",
1655-
"}",
1656-
"",
1657-
"console.log(makeid(5), \"1234\" /* (optional) */);"
1658-
],
1659-
"tags": [
1660-
"javascript",
1661-
"function",
1662-
"random"
1663-
],
1664-
"author": "kruimol"
16651665
}
16661666
]
16671667
},

public/data/javascript.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,19 @@
274274
],
275275
"tags": ["string", "tabs", "spaces"],
276276
"author": "axorax"
277+
},
278+
{
279+
"title": "Random string",
280+
"description": "Generates a random string of characters of a certain length",
281+
"code": [
282+
"function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {",
283+
" return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');",
284+
"}",
285+
"",
286+
"console.log(makeid(5, \"1234\" /* (optional) */));"
287+
],
288+
"tags": ["javascript", "function", "random"],
289+
"author": "kruimol"
277290
}
278291
]
279292
},

0 commit comments

Comments
 (0)