How to use the uuid/v3.DNS function in uuid

To help you get started, we’ve selected a few 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 flow-typed / flow-typed / definitions / npm / uuid_v3.x.x / test_uuid_v3.x.x.js View on Github external
});

// $ExpectError
uuid.v4({
  rng: () => "bla"
});

// $ExpectError
v4({
  rng: () => "bla"
});

v3.name;
v3("bla");
v3("bla", "bla");
v3("bla", v3.DNS);
v3("bla", v3.URL);
v3([0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea]);
v3(
  [0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea],
  [0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36]
);

// $ExpectError
v3("bla", { yolo: true });

v5.name;
v5("bla");
v5("bla", "bla");
v5("bla", v5.DNS);
v5("bla", v5.URL);
v5([0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea]);
github knorm / knorm / test / Model / Validate.spec.js View on Github external
      expect(() => validate.uuid(uuid3('foo.com', uuid3.DNS)), 'not to throw');
    });
github knorm / knorm / test / Model / Validate.spec.js View on Github external
          () => validate.uuid3(uuid3('foo.com', uuid3.DNS)),
          'to throw',
github minimal-studio / web-server / bak / system / servers / frond-end-deployment / deployment.js View on Github external
const {
      username, projName, projCode, projDesc
    } = req.body;

    let isProjExist = !!db.get('projects').find({
      projCode
    }).value();

    if(isProjExist) return res.json({err: projCode + ' is exist'});

    if(!username || !projCode || !projName) return res.json({
      err: true,
      desc: 'username, projName, projCode are required.'
    });

    const createProjId = uuidv3(projName + projCode + username, uuidv3.DNS);
    
    let newProject = entityMerge(req.body, projectEntity);
    Object.assign(newProject, {
      id: createProjId,
      createdDate: Date.now(),
      founder: username
    });
    
    db.set(`projects.${createProjId}`, newProject).write();
    audit(createProjId, {
      username,
      note: projDesc,
      type: 'createProj'
    });
  
    res.json({