Skip to content

Commit e7a1093

Browse files
committed
Update consolidated snippets
1 parent 2c1ff11 commit e7a1093

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-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
},

0 commit comments

Comments
 (0)