{"_id":"nanoid-esm","_rev":"5-17211263b806ed14e79a5215859aa802","name":"nanoid-esm","dist-tags":{"latest":"2.1.0-esm.4"},"versions":{"2.1.0-esm.0":{"name":"nanoid-esm","version":"2.1.0-esm.0","description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","module":"dist/index.js","main":"dist/cjs/index.js","keywords":["uuid","random","id","url"],"scripts":{"prepare":"run-s clean && run-p compile docs","spellcheck":"yarn docs && yaspeller-ci *.md docs/*.html","clean":"rimraf dist coverage && mkdirp dist dist/cjs","docs":"jsdoc -d docs source/**/*.js","lint":"eslint-ci source/**/*.js","compile":"run-p compile-esm compile-cjs","compile-esm":"babel source --out-dir dist --plugins=transform-commonjs","compile-cjs":"babel source --out-dir dist/cjs","test":"jest --coverage && yarn lint && size-limit && yarn spellcheck","start":"parcel serve source/test/demo/index.html -d source/test/demo/build --open"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ai/nanoid.git"},"browser":{"./index.js":"./index.browser.js","./random.js":"./random.browser.js","./async/index.js":"./async/index.browser.js","./async/random.js":"./async/random.browser.js"},"sideEffects":false,"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@logux/eslint-config":"^28.0.0","babel-plugin-transform-commonjs":"^1.1.5","benchmark":"^2.1.4","chalk":"^2.4.2","clean-publish":"^1.1.0","eslint":"^5.15.3","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.16.0","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","gzip-size":"^5.0.0","husky":"^1.3.1","jest":"^24.5.0","jsdoc":"^3.5.5","lint-staged":"^8.1.5","microtime":"^3.0.0","mkdirp":"^0.5.1","npm-run-all":"^4.1.5","parcel-bundler":"^1.12.3","rimraf":"^2.6.3","rndm":"^1.2.0","secure-random-string":"^1.1.0","shortid":"^2.2.14","size-limit":"^0.21.1","uid-safe":"^2.1.5","uuid":"^3.3.2","yaspeller-ci":"^1.0.0"},"size-limit":[{"path":"source/index.js","limit":"141 B"},{"path":"source/generate.js","limit":"177 B"},{"path":"source/url.js","limit":"64 B"},{"path":"source/non-secure/index.js","limit":"105 B"},{"path":"source/non-secure/generate.js","limit":"47 B"},{"path":"source/async/index.js","limit":"153 B"},{"path":"source/async/generate.js","limit":"198 B"}],"eslintConfig":{"extends":"@logux/eslint-config/browser","rules":{"consistent-return":"off","valid-jsdoc":"off","yoda":"off"},"overrides":{"files":["source/test/**/*.js"],"rules":{"global-require":"off"}}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"husky---DISABLED":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"rootDir":"source","coverageDirectory":"../coverage","testEnvironment":"node","coverageThreshold":{"global":{"statements":100}}},"yaspeller":{"lang":"en","ignoreCapitalization":true,"excludeFiles":["docs/*.js.html","README-*.md"],"dictionary":["esm","es","commonjs","Versioning","JSDoc","GMT","js","UUID","nanoid","gzipped","Crypto","bruteforcing","cryptographically","v4","Vsevolod","Rodionov","Mokhov","Anton","Khlynovskiy","Klebanoff","IE 11","Haskell","Zachary","Golba","CLI","npm","Clojure","ClojureScript","async","nonSecure","Wenliang","Dai","Ori","Livni","Mon","Tue","Thu","Fri","Eatall","Sep","Hendry","Sadrak","Dmitriy","Tsvettsikh","Belym","Oct","Nim","rqrqrqrq","formatAsync","generateAsync","asyncGenerator","gzip","Daniil","Poroshin","joelgetaction","xiaody"]},"gitHead":"9691262187a4101297217c97d7184f0bb6f32d87","bugs":{"url":"https://github.com/ai/nanoid/issues"},"homepage":"https://github.com/ai/nanoid#readme","_id":"nanoid-esm@2.1.0-esm.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"},"dist":{"integrity":"sha512-/jCwlH8ZZU5ycACKVqSzt/jWuAPCewvJWM0w5WVEDd95yooeM0d79jh1byFZp2LUQn6d7X7G0JJSOSBg66KNyg==","shasum":"79967b0473dcc38f30de115659421641606ba3d4","tarball":"https://registry.npmjs.org/nanoid-esm/-/nanoid-esm-2.1.0-esm.0.tgz","fileCount":66,"unpackedSize":74529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmgngCRA9TVsSAnZWagAArOIP/0Kp6TpR4l1+quSwiGNh\nmRzyVevKlMeBidrsXBnAy39DfWw/v0vKS5QwYAKFngKbPXJjkXSTejAjVSZx\nUMW/MyLhoBLXAq0dlWDQCLJNltqnS7dSWI70UMjW9yp6X4xqxdDvlLLbENwr\nEBKn8sjvoj0JHq4wBdANKk0MY4q/zfmtWw1Y9V3O291UcNKyCuaXwxHNbr4d\noq5IATAVEDtaZp0P3KBxx/Az0yVQoa35+b8Xsalckmo7Gi24Fw9lJt75z/oC\nL+cF3vAiUtUJMp7aOcYOh0hVGz5qy562Cn5xoI+qjkF31Uizq1+m+QO3ADGf\nS4IowK8xgxk3MhWbNtfOdtB0XOZOV2L0JHRPCl42NvTRyI4vUD7ZMrwqXXW1\no32RD5fQZdGEmjyLXQJWb2AA+IySAQBT9TQaLHHk90OWN/Ly9LYJ2QcsDPxI\nOKjo/x5Ps0jsKc+JHiitrsF5G13lQ6CFFpZCVuLwIS1CRlSn7KZ526V96oLA\nMWm+kGaR4pjS6Mnb5yFHQQHc/Qti6FuMUHkkGViADOKaRcSRm48dDq2kh0Q6\n8L8BNiZsUdt7bjDolHwu78NO+WA9VJBg5GZb2xXXSwSlopiQLnknrYo+5shd\nsxLTURfsrwHlzRQKcvpS/XiD8aI4imRMMuALkveracGjPdaW167wJBMPXpT1\n0rrA\r\n=iXj/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBoMXDrsS7x42sJ4ZV4CZBhb7nm76fOIAcTzJvn3RPyJAiEAwdC+I/FIwy/BcnlBBlWzb8p3JQOzltNL1SWoMhCIw8k="}]},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoid-esm_2.1.0-esm.0_1553598943995_0.665353094108246"},"_hasShrinkwrap":false},"2.1.0-esm.1":{"name":"nanoid-esm","version":"2.1.0-esm.1","description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","module":"dist/index.js","main":"dist/cjs/index.js","keywords":["uuid","random","id","url"],"scripts":{"prepare":"run-s clean && run-p compile docs","spellcheck":"yarn docs && yaspeller-ci *.md docs/*.html","clean":"rimraf dist coverage && mkdirp dist dist/cjs","docs":"jsdoc -d docs source/**/*.js","lint":"eslint-ci source/**/*.js","compile":"run-p compile-esm compile-cjs","compile-esm":"babel source --out-dir dist --plugins=transform-commonjs","compile-cjs":"babel source --out-dir dist/cjs","test":"jest --coverage && yarn lint && size-limit && yarn spellcheck","start":"parcel serve source/test/demo/index.html -d source/test/demo/build --open"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ai/nanoid.git"},"browser":{"./index.js":"./index.browser.js","./random.js":"./random.browser.js","./async/index.js":"./async/index.browser.js","./async/random.js":"./async/random.browser.js"},"sideEffects":false,"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@logux/eslint-config":"^28.0.0","babel-plugin-transform-commonjs":"^1.1.5","benchmark":"^2.1.4","chalk":"^2.4.2","clean-publish":"^1.1.0","eslint":"^5.15.3","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.16.0","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","gzip-size":"^5.0.0","husky":"^1.3.1","jest":"^24.5.0","jsdoc":"^3.5.5","lint-staged":"^8.1.5","microtime":"^3.0.0","mkdirp":"^0.5.1","npm-run-all":"^4.1.5","parcel-bundler":"^1.12.3","rimraf":"^2.6.3","rndm":"^1.2.0","secure-random-string":"^1.1.0","shortid":"^2.2.14","size-limit":"^0.21.1","uid-safe":"^2.1.5","uuid":"^3.3.2","yaspeller-ci":"^1.0.0"},"size-limit":[{"path":"source/index.js","limit":"141 B"},{"path":"source/generate.js","limit":"177 B"},{"path":"source/url.js","limit":"64 B"},{"path":"source/non-secure/index.js","limit":"105 B"},{"path":"source/non-secure/generate.js","limit":"47 B"},{"path":"source/async/index.js","limit":"153 B"},{"path":"source/async/generate.js","limit":"198 B"}],"eslintConfig":{"extends":"@logux/eslint-config/browser","rules":{"consistent-return":"off","valid-jsdoc":"off","yoda":"off"},"overrides":{"files":["source/test/**/*.js"],"rules":{"global-require":"off"}}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"husky---DISABLED":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"rootDir":"source","coverageDirectory":"../coverage","testEnvironment":"node","coverageThreshold":{"global":{"statements":100}}},"yaspeller":{"lang":"en","ignoreCapitalization":true,"excludeFiles":["docs/*.js.html","README-*.md"],"dictionary":["esm","es","commonjs","Versioning","JSDoc","GMT","js","UUID","nanoid","gzipped","Crypto","bruteforcing","cryptographically","v4","Vsevolod","Rodionov","Mokhov","Anton","Khlynovskiy","Klebanoff","IE 11","Haskell","Zachary","Golba","CLI","npm","Clojure","ClojureScript","async","nonSecure","Wenliang","Dai","Ori","Livni","Mon","Tue","Thu","Fri","Eatall","Sep","Hendry","Sadrak","Dmitriy","Tsvettsikh","Belym","Oct","Nim","rqrqrqrq","formatAsync","generateAsync","asyncGenerator","gzip","Daniil","Poroshin","joelgetaction","xiaody"]},"gitHead":"3ce59ea30ba33a8b046a6877080d4ecddf7103f6","bugs":{"url":"https://github.com/ai/nanoid/issues"},"homepage":"https://github.com/ai/nanoid#readme","_id":"nanoid-esm@2.1.0-esm.1","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"},"dist":{"integrity":"sha512-oheq2Y5iJu762b/jznv0xYHeTuXN07YyoKz/IhgNh9p1fEwjR8E9vEo54uR/ELeuA1afynnilJOlxgj+R33B7w==","shasum":"78072a7d7a4a9dc8052b7f105832453cccd7671c","tarball":"https://registry.npmjs.org/nanoid-esm/-/nanoid-esm-2.1.0-esm.1.tgz","fileCount":66,"unpackedSize":74365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmg8qCRA9TVsSAnZWagAA5awP/jCBUcGss2RfQBgd6n4x\nZ5ARBUnToNAVW5gwCkFbsvmKdBl1FVw2KzrbIWwVG0AaDKufyhUvFnq1kPnD\nSkKN7fo0zeCJxwXmyCHleuo/MD/vg5O9i+v+DO+o+K/Kv+p+fUq1QYO09Xmn\nC9oI5u3iPr/PAbl8vn6Av0FE9I2InCur0njfdlPCI8NkCyXrrrFCzvBINbUP\ngHp1tLmnCRkGuGaQc5ifGpQUdBxGqz7uN2atssEK4O5c046vWxJv6iR+nYYv\n4UCvJpcfp3Ki6aCZpnsE5xzltS4VWPPlTSfxPO55COZaCohTfCE/opSYF6vh\nIHoWqXCFv37EhPjAqqROwzvQ/PGiMFRoJMMS6wWu5ym8EsPJiwDQYuGDeZ/v\nc8Cc8WysJPGcMpYy2JqtNl9+wXhoveTzH5rntrSJw5GtZoJ+cORtJhBR5Hxi\nH3raK3Lsre0ekoyCtNITNr6KnA3c+Im4GlX0rNi8ztYp2gnsy8HBdh+rvITJ\nILBzVJ3vd+P+BFb4HhLOSCzAIrFXHt/KaVwUu3TXs6oUPNHRjFje7+Xsr+Tm\n6u4YY9K5QocYa3q2yj9VxhqhDzUjVERaXbHJWZpEwCgXfhmCnWHZJ7HBvi7W\npwnfrdnM7LE7kLPPZKPdjKU3GPfweCSOOO/LyFg/5ddJQp5tGiVcjDlwtoIt\nvmoH\r\n=tTop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClsv/Sd3brbUMP734TYMq7xxSg5MNT/xSd7RNwFfWb7gIgKwas4tzpqXJgVidAYh3HtKGTOStKbHIaiQxPcuhmJkw="}]},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoid-esm_2.1.0-esm.1_1553600297965_0.09435406766275056"},"_hasShrinkwrap":false},"2.1.0-esm.2":{"name":"nanoid-esm","version":"2.1.0-esm.2","description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","main":"index.js","module":"dist-esm/index.js","keywords":["uuid","random","id","url"],"scripts":{"prepare":"yarn clean && yarn compile-esm && yarn docs && yarn test","spellcheck":"yarn docs && yaspeller-ci *.md docs/*.html","clean":"rimraf docs/ coverage/","compile-esm":"rimraf dist-esm && babel ./ --out-dir dist-esm --plugins=transform-commonjs --ignore node_modules --ignore dist-esm --ignore coverage --ignore docs --ignore test","docs":"jsdoc -d docs *.js async/*.js non-secure/*.js","lint":"eslint-ci *.js {async,non-secure,test}/*.js test/{benchmark,alphabet,**/*.js}","test":"jest --coverage && yarn lint && yarn spellcheck","start":"parcel serve test/demo/index.html -d test/demo/build --open"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"https://github.com/ai/nanoid.git"},"browser":{"./index.js":"./index.browser.js","./random.js":"./random.browser.js","./async/index.js":"./async/index.browser.js","./async/random.js":"./async/random.browser.js"},"sideEffects":false,"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@logux/eslint-config":"^28.0.0","babel-plugin-transform-commonjs":"^1.1.5","benchmark":"^2.1.4","chalk":"^2.4.2","clean-publish":"^1.1.0","eslint":"^5.15.3","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.16.0","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","gzip-size":"^5.0.0","husky":"^1.3.1","jest":"^24.5.0","jsdoc":"^3.5.5","lint-staged":"^8.1.5","microtime":"^3.0.0","parcel-bundler":"^1.12.3","rimraf":"^2.6.3","rndm":"^1.2.0","secure-random-string":"^1.1.0","shortid":"^2.2.14","size-limit":"^0.21.1","uid-safe":"^2.1.5","uuid":"^3.3.2","yaspeller-ci":"^1.0.0"},"size-limit":[{"path":"index.js","limit":"141 B"},{"path":"generate.js","limit":"177 B"},{"path":"url.js","limit":"64 B"},{"path":"non-secure/index.js","limit":"105 B"},{"path":"non-secure/generate.js","limit":"47 B"},{"path":"async/index.js","limit":"153 B"},{"path":"async/generate.js","limit":"198 B"}],"eslintConfig":{"extends":"@logux/eslint-config/browser","rules":{"consistent-return":"off","valid-jsdoc":"off","yoda":"off"},"overrides":{"files":["test/*.js"],"rules":{"global-require":"off"}}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"node","coverageThreshold":{"global":{"statements":100}}},"yaspeller":{"lang":"en","ignoreCapitalization":true,"excludeFiles":["docs/*.js.html","README-*.md"],"dictionary":["Versioning","JSDoc","GMT","js","UUID","nanoid","gzipped","Crypto","bruteforcing","cryptographically","v4","Vsevolod","Rodionov","Mokhov","Anton","Khlynovskiy","Klebanoff","IE 11","Haskell","Zachary","Golba","CLI","npm","Clojure","ClojureScript","async","nonSecure","Wenliang","Dai","Ori","Livni","Mon","Tue","Thu","Fri","Eatall","Sep","Hendry","Sadrak","Dmitriy","Tsvettsikh","Belym","Oct","Nim","rqrqrqrq","formatAsync","generateAsync","asyncGenerator","gzip","Daniil","Poroshin","joelgetaction","xiaody"]},"licenseText":"The MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik <andrey@sitnik.ru>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"nanoid-esm@2.1.0-esm.2","dist":{"shasum":"cc985c2b20b0b16fb6754aea8a461e136c4c862f","integrity":"sha512-r3U5Wyr6tKGoNCnN/NFSgoFm4wgMFVrLzOwTkhgZQW3KEsdXxfO+oygKFxdY+BkKw3ibCk5+zkxESV8FnSjB1w==","tarball":"https://registry.npmjs.org/nanoid-esm/-/nanoid-esm-2.1.0-esm.2.tgz","fileCount":41,"unpackedSize":45556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnDgTCRA9TVsSAnZWagAAKXcP/0eZq6hivVHGp4dP2rRw\nM+OF5idvIqN0GrFkbuzO48LYiUjcY0gPloa2CTDBu6P+wEYW1Aa/DxEYJtJy\nY4PAZ+O67rLQbMB3Rjaq7l/QbzlnMlQKsd7e6C50Svsg0rvLkjMJ67vC6F4M\nn97uQUdmPa/yq+tcOPwRUcfJ3EHyjEHVRogVczZodt6ZPZqqwAUtiAAN50/m\nuHpVSOU2dcTE2kKgeUzoD+8VgWOPDW5lcT/1p74ZaAk4fQW/2McuuVBpf7PL\n6CbU4agINX6dHnIuYPBc8TCMCaN3T7VWBUJb5x0yBp8TtkvK9W1gWBwpQzc3\nHo+HbDY6EBxejaoCirmed7AsaoUEWPqJFtQeIUNTatRLu0Fkx7OMvBcgMufU\n4cTRGdhdnhcmb24fUogQN1CdF8rinQUE821JSPVcxQmv+lOsviBjQpzN4Lqb\njr6kmOsODCwwAKsaOBGNewzaLmIckjJwCBl5oe7nruSt2bYVN7YrLHpJTXeP\nbO/d8IxHVp6XvK+esE1o7kgafjDjrnTHjSf5WwA5bn8n/RWWJ+k1gBtOx+jD\nIP9VHeH4e3/oT1eF7YQ9zygoYz/v/xa2d3Di96ndKh7/3bWG2mRdieEi6+uk\nIXs6E13NAN0wpeaa9O3ER99FtW7mzNNYlBMaF5a+l91IXIONcZxzLz7o0b4V\nuiqS\r\n=RtYu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAytaHpelQxy/5sQzTW3NeA2CXeKDVnkNyjnru9CXMuNAiEAqofNdRpqBSxe3ziQi+JdCqFPsKOyBxDPMPzHiX4ObnM="}]},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"_npmUser":{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoid-esm_2.1.0-esm.2_1553741842317_0.6973059649958997"},"_hasShrinkwrap":false},"2.1.0-esm.3":{"name":"nanoid-esm","version":"2.1.0-esm.3","description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","main":"index.js","module":"dist-esm/index.browser.js","keywords":["uuid","random","id","url"],"scripts":{"prepare":"yarn clean && yarn compile-esm && yarn docs && yarn test","spellcheck":"yarn docs && yaspeller-ci *.md docs/*.html","clean":"rimraf docs/ coverage/","compile-esm":"rimraf dist-esm && babel ./ --out-dir dist-esm --plugins=transform-commonjs --ignore node_modules --ignore dist-esm --ignore coverage --ignore docs --ignore test","docs":"jsdoc -d docs *.js async/*.js non-secure/*.js","lint":"eslint-ci *.js {async,non-secure,test}/*.js test/{benchmark,alphabet,**/*.js}","test":"jest --coverage && yarn lint && yarn spellcheck","start":"parcel serve test/demo/index.html -d test/demo/build --open"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"https://github.com/ai/nanoid.git"},"browser":{"./index.js":"./index.browser.js","./random.js":"./random.browser.js","./async/index.js":"./async/index.browser.js","./async/random.js":"./async/random.browser.js"},"sideEffects":false,"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@logux/eslint-config":"^28.0.0","babel-plugin-transform-commonjs":"^1.1.5","benchmark":"^2.1.4","chalk":"^2.4.2","clean-publish":"^1.1.0","eslint":"^5.15.3","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.16.0","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","gzip-size":"^5.0.0","husky":"^1.3.1","jest":"^24.5.0","jsdoc":"^3.5.5","lint-staged":"^8.1.5","microtime":"^3.0.0","parcel-bundler":"^1.12.3","rimraf":"^2.6.3","rndm":"^1.2.0","secure-random-string":"^1.1.0","shortid":"^2.2.14","size-limit":"^0.21.1","uid-safe":"^2.1.5","uuid":"^3.3.2","yaspeller-ci":"^1.0.0"},"size-limit":[{"path":"index.js","limit":"141 B"},{"path":"generate.js","limit":"177 B"},{"path":"url.js","limit":"64 B"},{"path":"non-secure/index.js","limit":"105 B"},{"path":"non-secure/generate.js","limit":"47 B"},{"path":"async/index.js","limit":"153 B"},{"path":"async/generate.js","limit":"198 B"}],"eslintConfig":{"extends":"@logux/eslint-config/browser","rules":{"consistent-return":"off","valid-jsdoc":"off","yoda":"off"},"overrides":{"files":["test/*.js"],"rules":{"global-require":"off"}}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"node","coverageThreshold":{"global":{"statements":100}}},"yaspeller":{"lang":"en","ignoreCapitalization":true,"excludeFiles":["docs/*.js.html","README-*.md"],"dictionary":["Versioning","JSDoc","GMT","js","UUID","nanoid","gzipped","Crypto","bruteforcing","cryptographically","v4","Vsevolod","Rodionov","Mokhov","Anton","Khlynovskiy","Klebanoff","IE 11","Haskell","Zachary","Golba","CLI","npm","Clojure","ClojureScript","async","nonSecure","Wenliang","Dai","Ori","Livni","Mon","Tue","Thu","Fri","Eatall","Sep","Hendry","Sadrak","Dmitriy","Tsvettsikh","Belym","Oct","Nim","rqrqrqrq","formatAsync","generateAsync","asyncGenerator","gzip","Daniil","Poroshin","joelgetaction","xiaody"]},"licenseText":"The MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik <andrey@sitnik.ru>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"nanoid-esm@2.1.0-esm.3","dist":{"shasum":"0f08f0cac6df750daf13da92ed7aa77fb9d0d4b7","integrity":"sha512-La8Z8lklmJjomeT7bQe13bsvQ8gqvIKdHhxTUSQhsqjtgxGrfOJUkyV+gi6H3Gs6DS52crtHQ905cPZMVlZ2sg==","tarball":"https://registry.npmjs.org/nanoid-esm/-/nanoid-esm-2.1.0-esm.3.tgz","fileCount":41,"unpackedSize":45564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnDtQCRA9TVsSAnZWagAA+PsP/2mZTfArxPFOxgIj9JNe\nDaQTKVcBj/2y/Fn5/gA3F3NgiN38r/ENAzoUKD+AAuSxF+iMYeS3xbdxS/su\nKNNVSZGCy6sP6Vu/rJaoPm5h/AV5OXvDIiSGFdru/Zy49NK5rE8zQ/a/AQkd\nm+LMHgll5liJs1DNObGTfjVPOfLcWsfbLIFachk/plzF1rp9MlVnUHDTWipR\ntyRmf380r/YgnqK6fmcM7mXUyO3LZLM0SSwCnneYiAoMMApEzSIo457IuPnv\nKa4d9iKH7PVSWM+qdaaNdd8eKP54Xnn4haf9co9IJ4i5qmGwMmCYQ2GBmk2w\nYbLb6RLOVlFsOLdnsqdjlIxmuL9BFm07YQruO8Jg/nHfa0SJECM3EFVBJv2X\n61+/uTjoUtiMG/Udg4B4B8/iT9dVe/5LqkHpiH3UYKc7DYEOkn0rS3dCETzC\nGTP5U4t40cNZ8qqdPdFlGk1QkMwp3cH22luqExrKsRxnbc+I9gK27Br67Xcn\nRP4OnHfnexgKHgb0WY9t9XYoEq5+mEjvteXe1N/qcVXpmgbDT9UYpwbRAHk8\nExs4ELbVwjVtAPxTbwkgenfuiE0LEgGoiZzXAyHfyYo5UAStVbjAouuZNmtS\nezlp1YAOSWsrMiFLGHANrZbsFmGSp5zVaQ6H/wBndIa36vCP6DVHiMaRGJP8\n6yPc\r\n=C2Gd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrFMASlq43gI9b7yiSSug56i3e8FwFzLx8gA6ZbHedjAIhAM4vcIjo29JfGZXN3YttEAaFn4axnKjdrlgaAg4mwOfr"}]},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"_npmUser":{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoid-esm_2.1.0-esm.3_1553742671753_0.6751707903825963"},"_hasShrinkwrap":false},"2.1.0-esm.4":{"name":"nanoid-esm","version":"2.1.0-esm.4","description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","main":"index.js","module":"dist-esm/index.browser.js","keywords":["uuid","random","id","url"],"scripts":{"prepare":"yarn clean && yarn compile-esm && yarn docs && yarn test","spellcheck":"yarn docs && yaspeller-ci *.md docs/*.html","clean":"rimraf docs/ coverage/","compile-esm":"rimraf dist-esm && babel ./ --out-dir dist-esm --plugins=transform-commonjs --ignore node_modules --ignore dist-esm --ignore coverage --ignore docs --ignore test && eliminate-text-between '// <disabled-in-es-modules>' '// </>' dist-esm/index.browser.js","docs":"jsdoc -d docs *.js async/*.js non-secure/*.js","lint":"eslint-ci *.js {async,non-secure,test}/*.js test/{benchmark,alphabet,**/*.js}","test":"jest --coverage && yarn lint && size-limit && yarn spellcheck","start":"parcel serve test/demo/index.html -d test/demo/build --open"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"https://github.com/ai/nanoid.git"},"browser":{"./index.js":"./index.browser.js","./random.js":"./random.browser.js","./async/index.js":"./async/index.browser.js","./async/random.js":"./async/random.browser.js"},"sideEffects":false,"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.4.0","@logux/eslint-config":"^28.0.0","babel-plugin-transform-commonjs":"^1.1.5","benchmark":"^2.1.4","chalk":"^2.4.2","clean-publish":"^1.1.0","eliminate-text-between":"0.0.2","eslint":"^5.15.3","eslint-ci":"^1.0.0","eslint-config-standard":"^12.0.0","eslint-plugin-es5":"^1.3.1","eslint-plugin-import":"^2.16.0","eslint-plugin-import-helpers":"^0.1.4","eslint-plugin-jest":"^22.4.1","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-security":"^1.4.0","eslint-plugin-standard":"^4.0.0","gzip-size":"^5.0.0","husky":"^1.3.1","jest":"^24.5.0","jsdoc":"^3.5.5","lint-staged":"^8.1.5","microtime":"^3.0.0","parcel-bundler":"^1.12.3","rimraf":"^2.6.3","rndm":"^1.2.0","secure-random-string":"^1.1.0","shortid":"^2.2.14","size-limit":"^0.21.1","uid-safe":"^2.1.5","uuid":"^3.3.2","yaspeller-ci":"^1.0.0"},"size-limit":[{"path":"index.js","limit":"141 B"},{"path":"generate.js","limit":"177 B"},{"path":"url.js","limit":"64 B"},{"path":"non-secure/index.js","limit":"105 B"},{"path":"non-secure/generate.js","limit":"47 B"},{"path":"async/index.js","limit":"153 B"},{"path":"async/generate.js","limit":"198 B"}],"eslintConfig":{"extends":"@logux/eslint-config/browser","rules":{"consistent-return":"off","valid-jsdoc":"off","yoda":"off"},"overrides":{"files":["test/*.js"],"rules":{"global-require":"off"}}},"lint-staged":{"*.md":"yaspeller-ci","*.js":"eslint"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"jest":{"testEnvironment":"node","coverageThreshold":{"global":{"statements":100}}},"yaspeller":{"lang":"en","ignoreCapitalization":true,"excludeFiles":["docs/*.js.html","README-*.md"],"dictionary":["Versioning","JSDoc","GMT","js","UUID","nanoid","gzipped","Crypto","bruteforcing","cryptographically","v4","Vsevolod","Rodionov","Mokhov","Anton","Khlynovskiy","Klebanoff","IE 11","Haskell","Zachary","Golba","CLI","npm","Clojure","ClojureScript","async","nonSecure","Wenliang","Dai","Ori","Livni","Mon","Tue","Thu","Fri","Eatall","Sep","Hendry","Sadrak","Dmitriy","Tsvettsikh","Belym","Oct","Nim","rqrqrqrq","formatAsync","generateAsync","asyncGenerator","gzip","Daniil","Poroshin","joelgetaction","xiaody"]},"licenseText":"The MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik <andrey@sitnik.ru>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"nanoid-esm@2.1.0-esm.4","dist":{"shasum":"a0797d858dd020a855787d43ebb2af6ab3f0cfeb","integrity":"sha512-6TzMVlfihlPl4Lfq3p+5pSAycwHSwsk+1C4T6TC26lW7zM6lAV1KlkBrzFttgXALBlD9xfJPdsef1jd8J6Vb7Q==","tarball":"https://registry.npmjs.org/nanoid-esm/-/nanoid-esm-2.1.0-esm.4.tgz","fileCount":41,"unpackedSize":45670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnGQfCRA9TVsSAnZWagAAeBMP/378GJMZQx9pHq7fXNZz\nG19JbmrpsfqOwcoBjhIbs99rpAqolpfbgZHxu5YJJMmn2qE4VR4TpzaJ4bQ5\n1vLiwnOO3P6Qu1GBZmvDrBxkdnOuj0o+PEYnSV8EAngqu08w3igQHIZ+aFjA\nqA30YrKgt5s4gJ59P1iXyGNDfpI2/eOQWMfgShEyz50Aq0vgA1JcGe2RuFRD\nxnCGHbPv0z3wjK7/DmOmRSexCQ0x7Hy321NPwIqwbYm7/XtAXlJuo5FwLvXD\nFVHNJEvqR4oEKK9z3Xal6RwpISK5dBM1IgQqL8iIJqkM7UKsjJQEw2EGyKAM\nG8QGZO6mSuadYJHSQ6TZt03PgpzCbUc/fPfeZdPpFjKd9aj8Y/xpmpZCkQwS\nX0rJGfcwCRkgpKEYAi4YnIb94z6a4vBrvG1OZHSBPQdboaGk7BJ57BwIBrpk\noiG6siSSRF6VCvcvzRI28icwYX6DLxO9SGqjTpWfAtWU/P3pKwVk+RLsTMlj\nFTIfdwtYcHx8eT29oXL5kuUi0v6QA2g66g7Wwbzfr6oQ4b8BhYExekmf5uab\nAPT35j9XDFLvkX7Dwo00kPzgaPnsPWWc1iXq7FCokVMs0RVVpkKuKMroYs5n\nGahoy/wu5PcElw4MB7NWnC2g+Fj1cP3oyXbk/zD0cdon9iWLHVSLJTUE2jOo\nAhrm\r\n=XweD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBuPkTe6kyrJCPWsSnJa82wQPpZ0tUzNI6wP5/bn0CWWAiEAolsA0nOFmDeqgA/ms2oxBbi2V2m3ZLEwArqANCCKFjM="}]},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"_npmUser":{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoid-esm_2.1.0-esm.4_1553753118646_0.4516784272132941"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-26T11:15:43.995Z","2.1.0-esm.0":"2019-03-26T11:15:44.164Z","modified":"2022-05-10T09:03:32.475Z","2.1.0-esm.1":"2019-03-26T11:38:18.112Z","2.1.0-esm.2":"2019-03-28T02:57:22.408Z","2.1.0-esm.3":"2019-03-28T03:11:11.874Z","2.1.0-esm.4":"2019-03-28T06:05:18.911Z"},"maintainers":[{"name":"chasemoskal","email":"lordbrimshaw@gmail.com"}],"description":"A tiny (141 bytes), secure URL-friendly unique string ID generator","keywords":["uuid","random","id","url"],"repository":{"type":"git","url":"https://github.com/ai/nanoid.git"},"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","readme":"# Nano ID\n\n<img src=\"https://ai.github.io/nanoid/logo.svg\" align=\"right\"\n     alt=\"Nano ID logo by Anton Lovchikov\" width=\"180\" height=\"94\">\n\nA tiny, secure, URL-friendly, unique string ID generator for JavaScript.\n\n* **Small.** 141 bytes (minified and gzipped). No dependencies.\n[Size Limit] controls the size.\n* **Safe.** It uses cryptographically strong random APIs\nand tests distribution of symbols.\n* **Fast.** It’s 16% faster than UUID.\n* **Compact.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).\nSo ID size was reduced from 36 to 21 symbols.\n\n```js\nvar nanoid = require('nanoid')\nmodel.id = nanoid() //=> \"V1StGXR8_Z5jdHi6B-myT\"\n```\n\nThe generator supports Node.js, React Native, and [all browsers].\n\n[all browsers]: http://caniuse.com/#feat=getrandomvalues\n[Size Limit]:   https://github.com/ai/size-limit\n\n<a href=\"https://evilmartians.com/?utm_source=nanoid\">\n  <img src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n       alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\">\n</a>\n\n\n## Security\n\n*See a good article about random generators theory:\n[Secure random values (in Node.js)]*\n\n\n### Unpredictability\n\nInstead of using the unsafe `Math.random()`, Nano ID uses the `crypto` module\nin Node.js and the Web Crypto API in browsers. These modules use unpredictable\nhardware random generator.\n\n\n### Uniformity\n\n`random % alphabet` is a popular mistake to make when coding an ID generator.\nThe spread will not be even; there will be a lower chance for some symbols\nto appear compared to others—so it will reduce the number of tries\nwhen brute-forcing.\n\nNano ID uses a [better algorithm] and is tested for uniformity.\n\n<img src=\"img/distribution.png\" alt=\"Nano ID uniformity\"\n     width=\"340\" height=\"135\">\n\n[Secure random values (in Node.js)]: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfba\n[better algorithm]: https://github.com/ai/nanoid/blob/master/format.js\n\n\n## Comparison with UUID\n\nNano ID is quite comparable to UUID v4 (random-based).\nIt has a similar number of random bits in the ID\n(126 in Nano ID and 122 in UUID), so it has a similar collision probability:\n\n> For there to be a one in a billion chance of duplication,\n> 103 trillion version 4 IDs must be generated.\n\nThere are two main differences between Nano ID and UUID v4:\n\n1. Nano ID uses a bigger alphabet, so a similar number of random bits\n   are packed in just 21 symbols instead of 36.\n2. Nano ID code is 3 times less than `uuid/v4` package:\n   141 bytes instead of 435.\n\n\n## Benchmark\n\n```rust\n$ ./test/benchmark\nnanoid                    693,132 ops/sec\nnanoid/generate           624,291 ops/sec\nuid.sync                  487,706 ops/sec\nuuid/v4                   471,299 ops/sec\nsecure-random-string      448,386 ops/sec\nshortid                    66,809 ops/sec\n\nAsync:\nnanoid/async              105,024 ops/sec\nnanoid/async/generate     106,682 ops/sec\nsecure-random-string       94,217 ops/sec\nuid                        92,026 ops/sec\n\nNon-secure:\nnanoid/non-secure       2,555,814 ops/sec\nrndm                    2,413,565 ops/sec\n```\n\n\n## Usage\n\n### Normal\n\nThe main module uses URL-friendly symbols (`A-Za-z0-9_-`) and returns an ID\nwith 21 characters (to have a collision probability similar to UUID v4).\n\n```js\nconst nanoid = require('nanoid')\nmodel.id = nanoid() //=> \"Uakgb_J5m9g-0JDMbcJqLJ\"\n```\n\nSymbols `-,.()` are not encoded in the URL. If used at the end of a link\nthey could be identified as a punctuation symbol.\n\nIf you want to reduce ID length (and increase collisions probability),\nyou can pass the length as an argument.\n\n```js\nnanoid(10) //=> \"IRFa-VaY2b\"\n```\n\nDon’t forget to check the safety of your ID length\nin our [ID collision probability] calculator.\n\n[ID collision probability]: https://zelark.github.io/nano-id-cc/\n\n### React\n**Do not** use a nanoid for `key` prop. In React `key` should be consistence\nbetween renders. This is bad code:\n\n```jsx\n<Item key={nanoid()} /> /* DON’T DO IT */\n```\n\nThis is good code. Note, that we added `\"input\"` string in front of `id`,\nbecause Nano ID could be started from number. HTML ID can’t be started\nfrom the number.\n\n```jsx\n  id = 'input' + nanoid()\n\n  render () {\n    return <>\n      <label htmlFor={this.id}>Label text</label>\n      <input id={this.id} type=\"text\"/>\n    </>;\n  }\n}\n```\n\n### React Native\n\nTo generate secure random IDs in React Native, you must use\n[a native random generator] and asynchronous API:\n\n```js\nconst generateSecureRandom = require('react-native-securerandom').generateSecureRandom\nconst format = require('nanoid/async/format')\nconst url = require('nanoid/url')\n\nasync function createUser () {\n  user.id = await format(generateSecureRandom, url, 21);\n}\n```\n\n[a native random generator]: https://github.com/rh389/react-native-securerandom\n\n\n### Mongoose\n\n```js\nconst mySchema = new Schema({\n  _id: {\n    type: String,\n    default: () => nanoid(10)\n  }\n})\n```\n\n\n### Web Workers\n\nWeb Workers don’t have access to a secure random generator.\n\nSecurity is important in IDs, when IDs should be unpredictable. For instance,\nin “access by URL” link generation.\n\nIf you don’t need unpredictable IDs, but you need Web Workers support,\nyou can use non‑secure ID generator.\n\n```js\nconst nanoid = require('nanoid/non-secure')\nmodel.id = nanoid() //=> \"Uakgb_J5m9g-0JDMbcJqLJ\"\n```\n\n\n## Async\n\nTo generate hardware random bytes, CPU will collect electromagnetic noise.\nDuring the collection, CPU doesn’t work.\n\nIf we will use asynchronous API for random generator,\nanother code could be executed during the entropy collection.\n\n```js\nconst nanoid = require('nanoid/async')\n\nasync function createUser () {\n  user.id = await nanoid()\n}\n```\n\nUnfortunately, you will not have any benefits in a browser, since Web Crypto API\ndoesn’t have asynchronous API.\n\n\n## Custom Alphabet or Length\n\nIf you want to change the ID's alphabet or length\nyou can use the low-level `generate` module.\n\n```js\nconst generate = require('nanoid/generate')\nmodel.id = generate('1234567890abcdef', 10) //=> \"4f90d13a42\"\n```\n\nCheck the safety of your custom alphabet and ID length\nin our [ID collision probability] calculator.\nYou can find popular alphabets in [`nanoid-dictionary`].\n\nAlphabet must contain 256 symbols or less.\nOtherwise, the generator will not be secure.\n\nAsynchronous and non-secure API is also available:\n\n```js\nconst generate = require('nanoid/async/generate')\nasync function createUser () {\n  user.id = await generate('1234567890abcdef', 10)\n}\n```\n\n```js\nconst generate = require('nanoid/non-secure/generate')\n\nuser.id = generate('1234567890abcdef', 10)\n```\n\n[ID collision probability]: https://alex7kom.github.io/nano-nanoid-cc/\n[`nanoid-dictionary`]:      https://github.com/CyberAP/nanoid-dictionary\n\n\n## Custom Random Bytes Generator\n\nYou can replace the default safe random generator using the `format` module.\nFor instance, to use a seed-based generator.\n\n```js\nconst format = require('nanoid/format')\n\nfunction random (size) {\n  const result = []\n  for (let i = 0; i < size; i++) {\n    result.push(randomByte())\n  }\n  return result\n}\n\nformat(random, \"abcdef\", 10) //=> \"fbaefaadeb\"\n```\n\n`random` callback must accept the array size and return an array\nwith random numbers.\n\nIf you want to use the same URL-friendly symbols with `format`,\nyou can get the default alphabet from the `url` file.\n\n```js\nconst url = require('nanoid/url')\nformat(random, url, 10) //=> \"93ce_Ltuub\"\n```\n\nAsynchronous API is also available:\n\n```js\nconst format = require('nanoid/async/format')\nconst url = require('nanoid/url')\n\nfunction random (size) {\n  return new Promise(…)\n}\n\nasync function createUser () {\n  user.id = await format(random, url, 10)\n}\n```\n\n## Tools\n\n* [ID size calculator] to choice smaller ID size depends on your case.\n* [`nanoid-dictionary`] with popular alphabets to use with `nanoid/generate`.\n* [`nanoid-cli`] to generate ID from CLI.\n* [`nanoid-good`] to be sure that your ID doesn't contain any obscene words.\n\n[`nanoid-dictionary`]: https://github.com/CyberAP/nanoid-dictionary\n[ID size calculator]:  https://zelark.github.io/nano-id-cc/\n[`nanoid-cli`]:        https://github.com/twhitbeck/nanoid-cli\n[`nanoid-good`]:       https://github.com/y-gagar1n/nanoid-good\n\n\n## Other Programming Languages\n\n* [C#](https://github.com/codeyu/nanoid-net)\n* [Clojure and ClojureScript](https://github.com/zelark/nano-id)\n* [Crystal](https://github.com/mamantoha/nanoid.cr)\n* [Dart](https://github.com/pd4d10/nanoid)\n* [Go](https://github.com/matoous/go-nanoid)\n* [Elixir](https://github.com/railsmechanic/nanoid)\n* [Haskell](https://github.com/4e6/nanoid-hs)\n* [Java](https://github.com/aventrix/jnanoid)\n* [Nim](https://github.com/icyphox/nanoid.nim)\n* [PHP](https://github.com/hidehalo/nanoid-php)\n* [Python](https://github.com/puyuan/py-nanoid) with [dictionaries](https://github.com/aidarkhanov/py-nanoid-dictionary)\n* [Ruby](https://github.com/radeno/nanoid.rb)\n* [Rust](https://github.com/nikolay-govorov/nanoid)\n* [Swift](https://github.com/antiflasher/NanoID)\n\nAlso, [CLI tool] is available to generate IDs from a command line.\n\n[CLI tool]: https://github.com/twhitbeck/nanoid-cli\n","readmeFilename":"README.md"}