Skip to content

Commit 036612e

Browse files
committed
Reduce bundle size
1 parent e790a5e commit 036612e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: format.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @name format
2525
*/
2626
module.exports = function (random, alphabet, size) {
27-
var step = Math.ceil(1.2 * 256 / alphabet.length * size)
27+
var step = Math.ceil(310 / alphabet.length * size)
2828

2929
var bytes, byte
3030
var id = ''

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"size-limit": [
5757
{
5858
"path": "index.js",
59-
"limit": "320 B"
59+
"limit": "260 B"
6060
}
6161
],
6262
"lint-staged": {

Diff for: random-browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var crypto = global.crypto || global.msCrypto
1+
var crypto = window.crypto || window.msCrypto
22

33
module.exports = function (bytes) {
44
return crypto.getRandomValues(new Uint8Array(bytes))

0 commit comments

Comments
 (0)