Clean up comments
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Andrey Sitnik · committed by Andrey Sitnik · parent f66faaa · Browse files · 4 files·+23 added−34 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+23 added−34 removed
- other:+23 added−34 removed
Provenance
- Commit
a4e2415- Tree
25d4112- Author
Andrey Sitnik <andrey@sitnik.ru>- Committer
Andrey Sitnik <andrey@sitnik.ru>- Parent
f66faaa
4 files changed+23 added−34 removed
modified:async/index.browser.js+6 added-10 removed
2 unmodified lines3456789789111011121415161713141516201718221920212215 unmodified lines2 unmodified lines
var crypto = self.crypto || self.msCrypto
// This alphabet uses a-z A-Z 0-9 _- symbols.// Symbols are generated for better gzip compression.// Final url is// '-_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA'// Symbols are generated for smaller size.// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBAvar url = '-_'
// Loop from 36 to 0 (from z to a and 9 to 0 in Base36).var i = 36while (i--) { // 36 is radix. // Number.prototype.toString(36) returns number in Base36 representation. // Base36 is like hex, // but Base36 is represented using the numerals 0–9 and the Latin letters a-z // 36 is radix. Number.prototype.toString(36) returns number // in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. url += i.toString(36)}
// Loop from 36 to 10 (from Z to A in Base36).i = 36// Loop from 36 to 10 (from Z to A in Base36)while (i-- - 10) { url += i.toString(36).toUpperCase()}
15 unmodified linesmodified:non-secure/index.js+6 added-10 removed
123423465679101112891011151213171415161725 unmodified lines// This alphabet uses a-z A-Z 0-9 _- symbols.// Symbols are generated for better gzip compression.// Final url is// '-_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA'// Symbols are generated for smaller size.// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBAvar url = '-_'
// Loop from 36 to 0 (from z to a and 9 to 0 in Base36).var i = 36while (i--) { // 36 is radix. // Number.prototype.toString(36) returns number in Base36 representation. // Base36 is like hex, // but Base36 is represented using the numerals 0–9 and the Latin letters a-z // 36 is radix. Number.prototype.toString(36) returns number // in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. url += i.toString(36)}
// Loop from 36 to 10 (from Z to A in Base36).i = 36// Loop from 36 to 10 (from Z to A in Base36)while (i-- - 10) { url += i.toString(36).toUpperCase()}
25 unmodified linesmodified:index.browser.js+6 added-10 removed
19 unmodified lines20212223242526242526282728293132333430313233373435393637383915 unmodified lines19 unmodified lines
var crypto = self.crypto || self.msCrypto
// This alphabet uses a-z A-Z 0-9 _- symbols.// Symbols are generated for better gzip compression.// Final url is// '-_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA'// Symbols are generated for smaller size.// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBAvar url = '-_'
// Loop from 36 to 0 (from z to a and 9 to 0 in Base36).var i = 36while (i--) { // 36 is radix. // Number.prototype.toString(36) returns number in Base36 representation. // Base36 is like hex, // but Base36 is represented using the numerals 0–9 and the Latin letters a-z // 36 is radix. Number.prototype.toString(36) returns number // in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. url += i.toString(36)}
// Loop from 36 to 10 (from Z to A in Base36).i = 36// Loop from 36 to 10 (from Z to A in Base36)while (i-- - 10) { url += i.toString(36).toUpperCase()}
15 unmodified linesmodified:url.js+5 added-4 removed
12 unmodified lines1314151617181920212220212223232425262712 unmodified lines * const url = require('nanoid/url') * generate(url, 10) //=> "Uakgb_J5m9" */
// This alphabet uses a-z A-Z 0-9 _- symbols.// Symbols are generated for smaller size.// -_zyxwvutsrqponmlkjihgfedcba9876543210ZYXWVUTSRQPONMLKJIHGFEDCBAmodule.exports = '-_'var i = 36while (i--) { // 36 is radix. // Number.prototype.toString(36) returns number in Base36 representation. // Base36 is like hex, // but Base36 is represented using the numerals 0–9 and the Latin letters a-z // 36 is radix. Number.prototype.toString(36) returns number // in Base36 representation. Base36 is like hex, but it uses 0–9 and a-z. module.exports += i.toString(36) i > 9 && (module.exports += i.toString(36).toUpperCase())}