Skip to content

Commit

Permalink
Merge branch 'master' into rw-ie11-crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa authored Apr 25, 2018
2 parents b19b58f + df40e54 commit 748dbbf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/v35.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ module.exports = function(name, version, hashfunc) {
return buf || bytesToUuid(bytes);
};

generateUUID.name = name;
// only attempt to set the name if's configurable (which it should be on node > 0.12)
if (Object.getOwnPropertyDescriptor(generateUUID, 'name').configurable) {
Object.defineProperty(generateUUID, 'name', {value: name});
}

// Pre-defined namespaces, per Appendix C
generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
Expand Down

0 comments on commit 748dbbf

Please sign in to comment.