How to use the node-uuid.v1 function in node-uuid

To help you get started, we’ve selected a few node-uuid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / google-cloud-node / test / common / stream-router.js View on Github external
it('should maintain `this` context', function(done) {
      FakeClass.prototype.methodToExtend = function() { return this.uuid; };

      var cls = new FakeClass();
      cls.uuid = uuid.v1();

      overrides.streamRouter.router_ = function(args, originalMethod) {
        assert.equal(originalMethod(), cls.uuid);
        done();
      };

      streamRouter.extend(FakeClass, 'methodToExtend');
      cls.methodToExtend();
    });
github twilson63 / node-cloudq / middleware.js View on Github external
Middleware.prototype.addWorker = function (queue, protocol, resource) {
  var id = uuid.v1();
  resource.workerId = id;
  this._workers[id] = {queue: queue, protocol: protocol, resource: resource, state: 0};
  return id;
};
github CIDARLAB / 3DuF / src / app / core / componentPort.js View on Github external
constructor(x, y, label, layer){
        this._id = uuid.v1();
        this._x = x;
        this._y = y;
        this._label = label;
        this._layer = layer;
    }
github amd / rest3d / server / src / resource.js View on Github external
var getuuid = function(resource, callback) {
  var cb=callback;

  if (!resource.uuid){
    var id = uuid.v1();
    /*
    if (Resource.tmpAssets[id])
      return getuuid(resource,cb);
    else
      */
      resource.uuid = id;
  }
  resource.save(cb);
}
github FabMo / FabMo-Engine / routes / util.js View on Github external
function createUpload(metadata, callback) {
    var key = uuid.v1();
    log.info('Creating upload ' + key);
    UPLOAD_INDEX[key] = {
        file_count : metadata.files.length,
        meta : metadata.meta || {},
        files : metadata.files,
        callback : callback
    }
    setUploadTimeout(key, UPLOAD_TIMEOUT);
    return key;
}

node-uuid

Rigorous implementation of RFC4122 (v1 and v4) UUIDs.

MIT
Latest version published 7 years ago

Package Health Score

56 / 100
Full package analysis

Popular node-uuid functions