Skip to content

Commit

Permalink
Update dev documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
daikoku-github-actions committed Jan 24, 2025
1 parent e34f053 commit 82ba207
Show file tree
Hide file tree
Showing 2 changed files with 505 additions and 337 deletions.
17 changes: 15 additions & 2 deletions docs/__server/server.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -96641,26 +96641,39 @@ exports.bgWhiteBright = init(107, 49)
/***/ 95042:
/***/ ((module) => {

// This alphabet uses `A-Za-z0-9_-` symbols.
// The order of characters is optimized for better gzip and brotli compression.
// References to the same file (works both for gzip and brotli):
// `'use`, `andom`, and `rict'`
// References to the brotli default dictionary:
// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'

let customAlphabet = (alphabet, defaultSize = 21) => {
return (size = defaultSize) => {
let id = ''
let i = size
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size | 0
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += alphabet[(Math.random() * alphabet.length) | 0]
}
return id
}
}

let nanoid = (size = 21) => {
let id = ''
let i = size
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size | 0
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
}

module.exports = { nanoid, customAlphabet }


Expand Down
Loading

0 comments on commit 82ba207

Please sign in to comment.