Skip to content

Commit

Permalink
Reduce bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 6, 2017
1 parent e790a5e commit 036612e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion format.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @name format
*/
module.exports = function (random, alphabet, size) {
var step = Math.ceil(1.2 * 256 / alphabet.length * size)
var step = Math.ceil(310 / alphabet.length * size)

var bytes, byte
var id = ''
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"size-limit": [
{
"path": "index.js",
"limit": "320 B"
"limit": "260 B"
}
],
"lint-staged": {
Expand Down
2 changes: 1 addition & 1 deletion random-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var crypto = global.crypto || global.msCrypto
var crypto = window.crypto || window.msCrypto

module.exports = function (bytes) {
return crypto.getRandomValues(new Uint8Array(bytes))
Expand Down

0 comments on commit 036612e

Please sign in to comment.