Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/node_modules/nanoid/non-secure
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/nanoid/non-secure/index.cjs

    rd565449 r0c6b92a  
     1// This alphabet uses `A-Za-z0-9_-` symbols.
     2// The order of characters is optimized for better gzip and brotli compression.
     3// References to the same file (works both for gzip and brotli):
     4// `'use`, `andom`, and `rict'`
     5// References to the brotli default dictionary:
     6// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
    17let urlAlphabet =
    28  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
     9
    310let customAlphabet = (alphabet, defaultSize = 21) => {
    411  return (size = defaultSize) => {
    512    let id = ''
    6     let i = size
     13    // A compact alternative for `for (var i = 0; i < step; i++)`.
     14    let i = size | 0
    715    while (i--) {
     16      // `| 0` is more compact and faster than `Math.floor()`.
    817      id += alphabet[(Math.random() * alphabet.length) | 0]
    918    }
     
    1120  }
    1221}
     22
    1323let nanoid = (size = 21) => {
    1424  let id = ''
    15   let i = size
     25  // A compact alternative for `for (var i = 0; i < step; i++)`.
     26  let i = size | 0
    1627  while (i--) {
     28    // `| 0` is more compact and faster than `Math.floor()`.
    1729    id += urlAlphabet[(Math.random() * 64) | 0]
    1830  }
    1931  return id
    2032}
     33
    2134module.exports = { nanoid, customAlphabet }
  • imaps-frontend/node_modules/nanoid/non-secure/index.js

    rd565449 r0c6b92a  
     1// This alphabet uses `A-Za-z0-9_-` symbols.
     2// The order of characters is optimized for better gzip and brotli compression.
     3// References to the same file (works both for gzip and brotli):
     4// `'use`, `andom`, and `rict'`
     5// References to the brotli default dictionary:
     6// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
    17let urlAlphabet =
    28  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
     9
    310let customAlphabet = (alphabet, defaultSize = 21) => {
    411  return (size = defaultSize) => {
    512    let id = ''
    6     let i = size
     13    // A compact alternative for `for (var i = 0; i < step; i++)`.
     14    let i = size | 0
    715    while (i--) {
     16      // `| 0` is more compact and faster than `Math.floor()`.
    817      id += alphabet[(Math.random() * alphabet.length) | 0]
    918    }
     
    1120  }
    1221}
     22
    1323let nanoid = (size = 21) => {
    1424  let id = ''
    15   let i = size
     25  // A compact alternative for `for (var i = 0; i < step; i++)`.
     26  let i = size | 0
    1627  while (i--) {
     28    // `| 0` is more compact and faster than `Math.floor()`.
    1729    id += urlAlphabet[(Math.random() * 64) | 0]
    1830  }
    1931  return id
    2032}
     33
    2134export { nanoid, customAlphabet }
Note: See TracChangeset for help on using the changeset viewer.