Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jul 8, 2018
1 parent c1b2a6e commit 0033ab9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .size-limit
@@ -1,6 +1,6 @@
[
{
"path": "index.js",
"limit": "959 B"
"limit": "974 B"
}
]
6 changes: 4 additions & 2 deletions lib/generate.js
Expand Up @@ -9,8 +9,10 @@ function generate(number) {

var str = '';

while (!done) {
str = str + nanoIdgenerate(alphabet.characters(), 10)[loopCounter];
var random = nanoIdgenerate(alphabet.characters(), 16);

while (!done && loopCounter < 16) {
str = str + random[loopCounter];
done = number < (Math.pow(16, loopCounter + 1 ) );
loopCounter++;
}
Expand Down
14 changes: 0 additions & 14 deletions lib/random/random-byte-browser.js

This file was deleted.

10 changes: 0 additions & 10 deletions lib/random/random-byte.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -28,8 +28,7 @@
"url": "https://github.com/dylang/shortid.git"
},
"browser": {
"./lib/util/cluster-worker-id.js": "./lib/util/cluster-worker-id-browser.js",
"./lib/random/random-byte.js": "./lib/random/random-byte-browser.js"
"./lib/util/cluster-worker-id.js": "./lib/util/cluster-worker-id-browser.js"
},
"devDependencies": {
"chai": "^4.1.2",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Expand Up @@ -3016,6 +3016,10 @@ nan@^2.9.2:
version "2.10.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"

nanoid@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-1.0.5.tgz#4a45db5a53c02ae29188d6b136fbf069eecbd000"

nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
Expand Down

0 comments on commit 0033ab9

Please sign in to comment.