Roughing out the demo app

This commit is contained in:
Nate Taylor
2019-10-23 07:41:03 -05:00
parent 5bc58a2d40
commit 94be06d3c4
2841 changed files with 274065 additions and 2 deletions

32
node_modules/nanoid/async/index.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
var random = require('./random')
var url = require('../url')
/**
* Generate secure URL-friendly unique ID. Non-blocking version.
*
* By default, ID will have 21 symbols to have a collision probability similar
* to UUID v4.
*
* @param {number} [size=21] The number of symbols in ID.
*
* @return {Promise} Promise with random string.
*
* @example
* const nanoidAsync = require('nanoid/async')
* nanoidAsync.then(id => {
* model.id = id
* })
*
* @name async
* @function
*/
module.exports = function (size) {
size = size || 21
return random(size).then(function (bytes) {
var id = ''
while (size--) {
id += url[bytes[size] & 63]
}
return id
})
}