Skip to content
This repository
Browse code

use Math.random() instead of identifier

  • Loading branch information...
commit 7d83c1c59bc0338caa5c0d8225932923d40c89ee 1 parent 243305a
James Halliday authored

Showing 2 changed files with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. +2 3 index.js
  2. +1 2  package.json
5 index.js
... ... @@ -1,6 +1,5 @@
1 1 var upnode = require('upnode');
2 2 var semver = require('semver');
3   -var identifier = require('identifier');
4 3 var EventEmitter = require('events').EventEmitter;
5 4
6 5 exports.connect = function () {
@@ -225,7 +224,7 @@ exports.createServer = function (opts) {
225 224 params.port = port;
226 225 params.version = version;
227 226 params.role = role;
228   - params._id = identifier(16);
  227 + params._id = Math.random().toString(16).slice(2);
229 228
230 229 roles[role].push(params);
231 230 allocated.push(params);
@@ -269,7 +268,7 @@ exports.createServer = function (opts) {
269 268 params.port = port;
270 269 params.role = role;
271 270 params.version = version;
272   - params._id = identifier(16);
  271 + params._id = Math.random().toString(16).slice(2);
273 272 roles[role].push(params);
274 273 allocated.push(params);
275 274
3  package.json
@@ -29,8 +29,7 @@
29 29 "dependencies" : {
30 30 "upnode" : "~0.2.2",
31 31 "optimist" : "0.3.x",
32   - "semver" : "1.0.x",
33   - "identifier" : "0.0.x"
  32 + "semver" : "1.0.x"
34 33 },
35 34 "devDependencies" : {
36 35 "tap" : "~0.2.3",

0 comments on commit 7d83c1c

Please sign in to comment.
Something went wrong with that request. Please try again.